Video data encoding method, video data decoding device, and video data encoding device
Patent Information
- Application Number
- BR112025021374
- Authority / Receiving Office
- BR · BR
- Patent Type
- Applications
- Publication Date
- 2026-09-01
Smart Images

Figure 00000000_0000_ABST
Description
1 / 105 "VIDEO DATA ENCODING METHOD, VIDEO DATA DECODING DEVICE, AND VIDEO DATA ENCODING DEVICE"
[0001] This application claims priority to U.S. Patent Application No. 18 / 633,239, filed April 11, 2024, to U.S. Provisional Patent Application No. 63 / 496,284, filed April 14, 2023, and to U.S. Provisional Application No. 63 / 507,260, filed June 9, 2023, the entire contents of which are incorporated herein by reference. U.S. Patent Application No. 18 / 633,239, filed April 11, 2024, claims the benefit of U.S. Provisional Patent Application No. 63 / 496,284, filed April 14, 2023, and U.S. Provisional Patent Application No. 63 / 507,260, filed June 9, 2023. TECHNICAL FIELD
[0002] This disclosure relates to video code, including video encoding and video decoding. BACKGROUND
[0003] Digital video capabilities can be incorporated into a wide range of devices, including digital televisions, digital direct broadcast systems, wireless broadcast systems, personal digital assistants (PDAs), laptop or desktop computers, tablet computers, e-readers, digital cameras, digital recording devices, digital media players, video game devices, video game consoles, cellular or satellite radiotelephones, so-called smartphones, video conferencing devices, and video streaming devices. Petition 870250090148, dated 03 / 10 / 2025, page 9 / 243 2 / 105 and similar. Digital video devices implement video coding techniques, such as those described in the standards defined by MPEG-2, MPEG-4, ITU-T H.263, ITU-T H.264 / MPEG-4, Part 10, Advanced Video Coding (AVC), ITU-T H.265 / High Efficiency Video Coding (HEVC), ITU-T H.266 / Versatile Video Coding (VVC), and extensions of such standards, as well as proprietary video codecs / formats, such as AOMedia Video 1 (AV1), which was developed by the Alliance for Open Media. Video devices can transmit, receive, encode, decode, and / or store digital video information more efficiently through the implementation of these video encoding techniques.
[0004] Video coding techniques include spatial (intra-image) and / or temporal (inter-image) prediction to reduce or remove the inherent redundancy in video sequences. For block-based video coding, a video slice (e.g., a video image or a portion of a video image) can be partitioned into video blocks, which may also be called coding tree units (CTUs), coding units (CUs), and / or coding nodes. Video blocks in an intracoded (I) slice of an image are coded using spatial prediction with respect to reference samples in neighboring blocks in the same image. Video blocks in an intercoded (P or B) slice of an image may use spatial prediction with respect to reference samples in neighboring blocks in the same image or temporal prediction in Petition 870250090148, dated 03 / 10 / 2025, page 10 / 243 3 / 105 in relation to reference samples in other reference images. The images can be called frames and the reference images can be called reference frames. SUMMARY
[0005] In general, this disclosure describes techniques for encoding (encoding or decoding) transform coefficients of video data that are processed using Karhunen-Loeve transforms (KLTs). For example, during encoding, a video encoder can form a prediction block for a current block of video data and then calculate a residual block representing sample-by-sample differences between the current block and the prediction block. The video encoder can then apply one or more KLTs to the residual block to form a transform block in a transform domain (e.g., frequency). The video encoder can then determine contexts for context-based coding (e.g., context-adaptive binary arithmetic coding (CABAC)) of the resulting transform coefficients, according to the techniques of this disclosure.
[0006] Similarly, a video decoder can determine the contexts for context-based decoding of the transform coefficients and then apply inverse KLTs to the transform coefficients to reconstruct the residual block and then reconstruct the block by adding the residual block to the prediction block. According to the techniques of this disclosure, a Petition 870250090148, dated 03 / 10 / 2025, page 11 / 243 4 / 105 context for CABAC encoding data of a current transform coefficient can be determined according to a previous number N of transform coefficients encoded in a one-dimensional vector including the transform coefficients.
[0007] In one example, a method of encoding (encoding or decoding) video data includes determining a context for context-based encoding of a current transform coefficient of a current block of video data according to previously encoded transform coefficients, the previously encoded transform coefficients being a sequence of transform coefficients immediately preceding the current transform coefficient in scan order; and context-based encoding of the current transform coefficient using the determined context.
[0008] In another example, a device for encoding video data includes a device for decoding video data, the device comprising: a memory configured to store video data; and a processing system comprising one or more processors implemented in a circuit assembly, the processing system being configured to: determine a context for context-based encoding of a current transform coefficient of a current block of video data according to previously encoded transform coefficients, the previously encoded transform coefficients being a sequence of transform coefficients immediately preceding the current transform coefficient in scan order; and Petition 870250090148, dated 03 / 10 / 2025, page 12 / 243 5 / 105 context-based encoding of the current transform coefficient using the given context.
[0009] In another example, a computer-readable storage medium stored instructions on it that, when executed, cause a processor to: determine a context for context-based encoding of a current transform coefficient of a current block of video data according to previously encoded transform coefficients, the previously encoded transform coefficients being a sequence of transform coefficients immediately preceding the current transform coefficient in scan order; and context-based encoding of the current transform coefficient using the determined context.
[0010] In another example, a device for encoding video data includes means for determining a context for context-based encoding of a current transform coefficient of a current block of video data according to previously encoded transform coefficients, the previously encoded transform coefficients being a sequence of transform coefficients immediately preceding the current transform coefficient in scan order; and means for context-based encoding of the current transform coefficient using the determined context.
[0011] Details of one or more examples are presented in the attached drawings and in the description below. Other attributes, objectives and advantages will become apparent from the description, drawings and claims. BRIEF DESCRIPTION OF THE DRAWINGS Petition 870250090148, dated 03 / 10 / 2025, page 13 / 243 6 / 105
[0012] Figure 1 is a block diagram illustrating an example video encoding and decoding system that can perform the techniques of the present disclosure.
[0013] Figure 2 is a block diagram illustrating an example video encoder that can perform the techniques of the present disclosure.
[0014] Figure 3 is a block diagram illustrating an example video decoder that can perform the techniques of the present disclosure.
[0015] Figure 4 is a conceptual diagram illustrating an example two-dimensional causal neighborhood in which a template of neighbor transform coefficients for a current coefficient can be used to determine a context for encoding the current coefficient.
[0016] Figure 5 is a conceptual diagram illustrating an example of context shift zones for a significant coefficient flag.
[0017] Figure 6 is a conceptual diagram illustrating a process of transforming the inverse Karhunen-Loeve transform (KLT).
[0018] Figure 7 is a conceptual diagram illustrating an example of reordering decoded coefficients in a one-dimensional vector.
[0019] Figure 8 is a flowchart illustrating an example method for coding an actual block in accordance with the techniques of this disclosure.
[0020] Figure 9 is a flowchart illustrating an example method for decoding a current block according to the techniques of this disclosure. Petition 870250090148, dated 03 / 10 / 2025, page 14 / 243 7 / 105
[0021] Figure 10 is a flowchart illustrating an example method of determination contexts for encoding transform coefficients according to the techniques of this disclosure.
[0022] Figure 11 is a flowchart illustrating another example method of determination contexts for encoding transform coefficients according to the techniques of this disclosure. DETAILED DESCRIPTION
[0023] This disclosure describes techniques related to transform coding for video coding. A video encoder, for example, can encode a video data image using block-based coding. That is, the video encoder can initially partition the image into respective blocks, such as coding units (CUs). For a particular block, the video encoder can form a prediction block using, for example, interprediction or intraprediction, then form a residual block representing sample-by-sample differences between the block and the prediction block. The video encoder can then apply a transform to the residual block to transform residual samples, in the pixel domain, into a transform domain, such as a frequency domain. The video encoder can also sweep the transform coefficients to produce a one-dimensional vector of the transform block, which is a two-dimensional matrix.
[0024] The video encoder can entropically encode (i.e., context-based encoding) the transform coefficients of the one-dimensional vector one by one, which may include encoding of multiple elements. Petition 870250090148, dated 03 / 10 / 2025, page 15 / 243 8 / 105 of the syntax for each of the transform coefficients. Such syntax elements may include a sign value, a value indicating whether an absolute value of the transform coefficient is greater than zero, a value indicating whether the absolute value of the transform coefficient is greater than one, a value indicating whether the absolute value of the transform coefficient is greater than two, and a remaining value for the transform coefficient. The video encoder may additionally encode a last significant transform coefficient value for the block, indicating a location of a last non-zero transform coefficient in the scan order.
[0025] Similarly, a video decoder can form a prediction block for a current block and receive serialized transform coefficients in the form of a one-dimensional vector. The video decoder can entropically decode the transform coefficients and then perform an inverse scan to reconstruct the transform block. The video decoder can also inversely transform the transform block to reconstruct the residual block. Finally, the video decoder can reconstruct the current block by combining the residual block with the prediction block on a sample-by-sample basis.
[0026] By entropically encoding (encoding or decoding) the transform coefficients, the video encoder and video decoder can determine the context according to values of several previously encoded transform coefficients in scan order, instead of using a Petition 870250090148, dated 03 / 10 / 2025, p. 16 / 243 9 / 105 2D causal neighborhood of coefficients. The number of previously encoded coefficients to be used can be determined according to a value of a low-frequency non-separable transform index syntax element (lfnstIdx). For example, if lfnstIdx has a value of 0, then conventional context derivation techniques can be used. Otherwise, if lfnstIdx has a value greater than zero, the values of the 5 previously encoded transform coefficient syntax elements can be used to determine the context for encoding the next transform coefficient in scan order. The value of lfnstIdx can also be used to determine a Rice parameter value, which can be used when encoding a remainder value for a transform coefficient. In some examples, different context tables can be used based on the value of lfnstIdx.To determine the context for a current transform coefficient, the video encoder can use a context table corresponding to the value of lfnstIdx, which can map the position of the transform coefficient to a context value.
[0027] In some examples, the transform may be or include a Karhunen-Loeve transform (KLT). According to the techniques of this disclosure, when the transform includes a KLT, the video encoder (encoder or decoder) can determine contexts for entropic encoding of the transform coefficients (or individual syntax elements thereof) according to values of several immediately preceding transform coefficients in the one-dimensional vector. That is, Petition 870250090148, dated 03 / 10 / 2025, page 17 / 243 Instead of determining contexts based on a neighborhood of syntax elements adjacent to a current coefficient in the two-dimensional array, the video encoder can determine contexts based on K immediately preceding the transform coefficients in the one-dimensional vector. Thus, for example, if K equals 5, the video encoder can determine the contexts for the entropic encoding transform coefficient N using transform coefficients {N-1, N-2, N-3, N-4, N-5}. The preceding transform coefficients can be arranged in an order of KLT. In some examples, the video encoder can determine the value of K based on the current block size. For example, K might be 5 for 4x4 blocks or 6 for 8x8 blocks.
[0028] Figure 1 is a block diagram illustrating an example 100 video encoding and decoding system that can perform the techniques of this disclosure. The techniques of this disclosure generally refer to the process of encoding (encoding and / or decoding) video data. In general, video data includes any data to process a video. Thus, video data can include unencoded raw video, encoded video, decoded (e.g., reconstructed) video, and video metadata such as signaling data.
[0029] As shown in Figure 1, system 100 includes a source device 102 that provides encoded video data to be decoded and displayed by a destination device 116 in this example. In particular, the source device 102 provides the video data to the destination device 116 via a computer-readable medium. Petition 870250090148, dated 03 / 10 / 2025, page 18 / 243 11 / 105 110. The source device 102 and the destination device 116 may comprise any of a wide range of devices, including desktop computers, notebook computers (i.e., laptops), mobile devices, tablet computers, set-top boxes, telephone handsets such as smartphones, televisions, cameras, display devices, digital media players, video game consoles, video streaming devices, broadcast receiver devices, or similar devices. In some cases, the source device 102 and the destination device 116 may be equipped for wireless communication and, in this way, may be referred to as wireless communication devices.
[0030] In the example in Figure 1, source device 102 includes video source 104, memory 106, video encoder 200, and output interface 108. Destination device 116 includes input interface 122, video decoder 300, memory 120, and display device 118. According to this disclosure, the video encoder 200 of source device 102 and the video decoder 300 of destination device 116 can be configured to apply techniques for determining contexts for entropy coding transform coefficients using KLTs. In this way, source device 102 represents an example of a video encoding device, while destination device 116 represents an example of a video decoding device. In other examples, a source device and a destination device may include other components or arrangements. For example, source device 102 may receive data Petition 870250090148, dated 03 / 10 / 2025, page 19 / 243 12 / 105 video from an external video source, such as an external camera. Similarly, the target device 116 can interface with an external display device, instead of including an integrated display device.
[0031] As shown in Figure 1, the system 100 is merely an example. In general, any digital video encoding and / or decoding device can perform techniques to determine entropy coding transform coefficients processed using KLTs. Source device 102 and destination device 116 are merely examples of such encoding devices where source device 102 generates encoded video data for transmission to destination device 116. This disclosure refers to an encoding device as a device that performs encoding (encoding and / or decoding) of data. Thus, video encoder 200 and video decoder 300 represent examples of encoding devices, in particular, a video encoder and a video decoder, respectively.In some examples, the source device 102 and the destination device 116 may operate in a substantially symmetrical manner, such that each of the source device 102 and the destination device 116 includes video encoding and decoding components. In this way, the system 100 can support unidirectional or bidirectional video transmission between the source device 102 and the destination device 116, for example, for video streaming, video playback, video broadcasting, or video telephony.
[0032] In general, the video source 104 Petition 870250090148, dated 03 / 10 / 2025, page 20 / 243 13 / 105 represents a video data source (i.e., unencoded raw video data) and provides a sequential series of images (also called frames) from the video data to the video encoder 200, which encodes data for the images. The video source 104 from the source device 102 may include a video capture device, such as a video camera, a video file containing previously captured raw video, and / or a video feed interface for receiving video from a video content provider. As an additional alternative, the video source 104 may generate computer graphics-based data, such as the source video, or a combination of live video, archived video, and computer-generated video. In each case, the video encoder 200 encodes the captured, pre-captured, or computer-generated video data.The video encoder 200 can rearrange the images from the received order (sometimes called the display order) into an encoding order for encoding. The video encoder 200 can generate a bitstream that includes encoded video data. The source device 102 can then output the encoded video data via the output interface 108 to the computer-readable medium 110 for reception and / or retrieval, for example, via the input interface 122 of the destination device 116.
[0033] Memory 106 of source device 102 and memory 120 of destination device 116 represent general-purpose memories. In some instances, memories 106 and 120 may store raw video data, for example, raw video from video source 104 and raw and decoded video data from the video decoder. Petition 870250090148, dated 03 / 10 / 2025, page 21 / 243 14 / 105 300. Additionally or alternatively, memories 106 and 120 may store executable software instructions, for example, by video encoder 200 and video decoder 300, respectively. Although memory 106 and memory 120 are shown separately from video encoder 200 and video decoder 300 in this example, it should be understood that video encoder 200 and video decoder 300 may also include internal memories for functionally similar or equivalent purposes. Furthermore, memories 106 and 120 may store encoded video data, for example, output from video encoder 200 and input to video decoder 300. In some examples, portions of memories 106 and 120 may be allocated as one or more video buffers, for example, to store raw, decoded, and / or encoded video data.
[0034] The computer-readable medium 110 may represent any type of medium or device with the capability to carry encoded video data from the source device 102 to the destination device 116. In one example, the computer-readable medium 110 represents a communication medium to enable the source device 102 to transmit encoded video data directly to the destination device 116 in real time, for example, via a radio frequency network or computer-based network. The output interface 108 may modulate a transmission signal that includes the encoded video data, and the input interface 122 may demodulate the received transmission signal, according to a communication standard, such as a wireless communication protocol. The communication medium may comprise any wireless or wired communication medium, such as a Petition 870250090148, dated 03 / 10 / 2025, page 22 / 243 15 / 105 radio frequency (RF) spectrum or one or more physical transmission lines. The communication medium may be part of a packet-based network, such as a local area network, a wide area network, or a global network such as the Internet. The communication medium may include routers, switches, base stations, or any other equipment that may be useful in facilitating communication between the source device 102 and the destination device 116.
[0035] In some examples, source device 102 may output encoded data from output interface 108 to storage device 112. Similarly, destination device 116 may access encoded data from storage device 112 via input interface 122. Storage device 112 may include any of a variety of distributed or locally accessed data storage media, such as a hard disk, Blu-ray discs, DVDs, CD-ROMs, flash memory, volatile or non-volatile memory, or any other digital storage media suitable for storing encoded video data.
[0036] In some examples, source device 102 may output encoded video data to file server 114 or another intermediate storage device that may store the encoded video data generated by source device 102. Destination device 116 may access stored video data from file server 114 via streaming or download.
[0037] File server 114 can be any type of server device with the capability to Petition 870250090148, dated 03 / 10 / 2025, page 23 / 243 16 / 105 store encoded video data and transmit such encoded video data to the destination device 116. The file server 114 may represent a web server (for example, for a website), a server configured to provide a file transfer protocol service (such as File Transfer Protocol (FTP) or File Delivery over Unidirectional Transport (FLUTE)), a content delivery network (CDN) device, a hypertext transfer protocol (HTTP) server, a multimedia broadcast multicast service (MBMS) or enhanced MBMS (eMBMS) server, and / or a network attached storage (NAS) device.File server 114 may, additionally or alternatively, implement one or more HTTP streaming protocols, such as dynamic adaptive streaming over HTTP (DASH), HTTP live streaming (HLS), real-time streaming protocol (RTSP), or similar protocols.
[0038] The target device 116 can access encoded video data from the file server 114 through any standard data connection, including an internet connection. This can include a wireless channel (e.g., a Wi-Fi connection), a wired connection (e.g., digital subscriber line (DSL), cable modem, etc.) or a combination of both that is Petition 870250090148, dated 03 / 10 / 2025, page 24 / 243 17 / 105 suitable for accessing encoded video data stored on file server 114. Input interface 122 can be configured to operate according to any one or more of the various protocols discussed above to retrieve or receive media data from file server 114 or other protocols to retrieve media data.
[0039] Output interface 108 and input interface 122 may represent wireless transmitters / receivers, modems, wired network communication components (e.g., Ethernet cards), wireless communication components operating in accordance with any of a variety of Institute of Engineers standards. Electrical and Electronics Engineers (IEEE - Institute of Electrical and Electronics Engineers) 802.11 or other physical components. In examples where output interface 108 and input interface 122 comprise wireless components, output interface 108 and input interface 122 can be configured to transfer data, such as encoded video data, according to a cellular communication standard, such as 4G, 4G-LTE (long-term evolution), advanced LTE, 5G, or similar. In some examples where output interface 108 comprises a wireless transmitter, output interface 108 and input interface 122 can be configured to transfer data, such as encoded video data, according to other wireless standards, such as an IEEE 802.11 specification, an IEEE 802.15 specification (e.g., ZigBee™), a Bluetooth™ standard, or similar. In some examples, the source device 102 and / or the destination device 116 may include the respective system-on-a-chip (SoC) devices. For example, the device Petition 870250090148, dated 03 / 10 / 2025, p. 25 / 243 Source 102 (18 / 105) may include a SoC device to perform the functionality assigned to video encoder 200 and / or output interface 108, and destination device 116 may include a SoC device to perform the functionality assigned to video decoder 300 and / or input interface 122.
[0040] The techniques of this disclosure can be applied to video encoding to support any of a variety of multimedia applications, such as over-the-air television broadcasts, cable television broadcasts, satellite television broadcasts, Internet streaming video transmissions, such as dynamic adaptive streaming over HTTP (DASH), digital video that is encoded on a data storage medium, decoding of digital video stored on a data storage medium, or other applications.
[0041] The input interface 122 of the destination device 116 receives an encoded video bitstream from the computer-readable medium 110 (e.g., a communication medium, storage device 112, file server 114, or similar). The encoded video bitstream may include signaling information defined by the video encoder 200, which is also used by the video decoder 300, such as syntax elements that have values describing characteristics and / or processing video blocks or other encoded units (e.g., slices, images, image groups, sequences, or similar). The display device 118 displays decoded images from the decoded video data to a user. The display device 118 may represent any of several devices of Petition 870250090148, dated 03 / 10 / 2025, page 26 / 243 19 / 105 display, such as a liquid crystal display (LCD), a plasma display, an organic light-emitting diode (OLED) display, or another type of display device.
[0042] Although not shown in Figure 1, in some examples, the video encoder 200 and the video decoder 300 can each be integrated with an audio encoder and / or audio decoder and may include suitable MUX-DEMUX units, or other hardware and / or software, to handle multiplexed streams that include audio and video in a common data stream.
[0043] Each of the video encoders The 200 and 300 video decoder can be implemented as any of several suitable sets of encoder and / or decoder circuits, 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 the techniques are partially implemented in software, a device may store instructions for the software in a suitable non-transient, computer-readable medium and execute the instructions in hardware using one or more processors to perform the techniques of this disclosure.Each of the 200 video encoder and 300 video decoder can be included in one or more encoders or decoders, any of which can be integrated as part of one. Petition 870250090148, dated 03 / 10 / 2025, page 27 / 243 A device comprising a 20 / 105 combined encoder / decoder (CODEC) in a respective device. A device that includes a 200 video encoder and / or a 300 video decoder may comprise an integrated circuit, a microprocessor, and / or a wireless communication device, such as a mobile phone.
[0044] The Video Encoder 200 and Video Decoder 300 may operate according to a video coding standard, such as ITU-T H.265, also called High Efficiency Video Coding (HEVC), or extensions thereof, such as scalable and / or multi-view video coding extensions. Alternatively, the Video Encoder 200 and Video Decoder 300 may operate according to other proprietary or industry standards, such as ITU-T H.266, also called Versatile Video Coding (VVC). In other examples, the Video Encoder 200 and Video Decoder 300 may operate according to a proprietary video codec / format, such as AOMedia Video 1 (AV1), AV1 extensions and / or successor versions of AV1 (e.g., AV2). In other examples, the Video Encoder 200 and Video Decoder 300 may operate according to other proprietary formats or industry standards.The techniques of this disclosure, however, are not limited to any particular encoding standard or format. In general, the Video Encoder 200 and Video Decoder 300 can be configured to perform the techniques of this disclosure in conjunction with any video encoding techniques, including determining contexts for entropic coding transform coefficients processed using KLTs. Petition 870250090148, dated 03 / 10 / 2025, page 28 / 243 21 / 105
[0045] In general, the Video Encoder 200 and Video Decoder 300 can perform image block-based encoding. The term block generally refers to a structure that includes data to be processed (e.g., encoded, decoded, or otherwise used in the encoding and / or decoding process). For example, a block might include a two-dimensional array of luminance and / or chrominance data samples. In general, the Video Encoder 200 and Video Decoder 300 can encode video data represented in a YUV format (e.g., Y, Cb, Cr). In other words, instead of encoding red, green, and blue (RGB) data for samples of an image, the 200 video encoder and the 300 video decoder can encode luminance and chrominance components, where the chrominance components can include both red and blue hue chrominance components.In some examples, the 200 video encoder converts received RGB formatted data to a YUV representation before encoding, and the 300 video decoder converts the YUV representation to RGB format. Alternatively, pre- and post-processing units (not shown) can perform these conversions.
[0046] This disclosure may refer generally to the encoding (e.g., encoding and decoding) of images to include the process of encoding or decoding image data. Similarly, this disclosure may refer to the encoding of blocks of an image to include the process of encoding or decoding data for the blocks, for example, Petition 870250090148, dated 03 / 10 / 2025, page 29 / 243 22 / 105 Prediction and / or residual encoding. A coded video bitstream generally includes a series of values for syntax elements representing encoding decisions (e.g., encoding modes) and image partitioning into blocks. Thus, references to the encoding of an image or block should generally be understood as encoding values for syntax elements that form the image or block.
[0047] HEVC defines several blocks, including coding units (CUs), prediction units (PUs), and transform units (TUs). According to HEVC, a video encoder (such as video encoder 200) partitions a coding tree unit (CTU) into CUs according to a quadtree structure. That is, the video encoder partitions CTUs and CUs into four equal, non-overlapping squares, and each node in the quadtree has zero or four child nodes. Nodes without child nodes can be called leaf nodes, and the CUs of these leaf nodes may include one or more PUs and / or one or more TUs. The video encoder may additionally partition PUs and TUs. For example, in HEVC, a residual quadtree (RQT) represents the partitioning of TUs. In HEVC, PUs represent interprediction data, while TUs represent residual data.Intraprediction CUSs include intraprediction information, such as an indication of intramode.
[0048] As another example, the Video Encoder 200 and the Video Decoder 300 can be configured to operate according to VVC. According to VVC, a video encoder (such as the Video Encoder 200) Petition 870250090148, dated 03 / 10 / 2025, page 30 / 243 23 / 105 partitions an image into a plurality of encoding tree units (CTUs). The 200 video encoder can partition a CTU according to a tree structure, such as a quadtree-binary tree (QTBT) structure or a multi-type tree (MTT) structure. The QTBT structure removes the concepts of multiple partition types, such as the separation between CUs, PUs, and TUs of HEVC. A QTBT structure includes two levels: a first level partitioned according to the quadtree partition and a second level partitioned according to the binary tree partition. A root node of the QTBT structure corresponds to a CTU. The leaf nodes of the binary trees correspond to the encoding units (CUs).
[0049] In a partitioning structure of In MTT, blocks can be partitioned using a quadtree (QT) partition, a binary tree (BT) partition, and one or more triple tree (TT) partitions (also called ternary tree (TT) partitions). A triple or ternary tree partition is a partition where a block is divided into three sub-blocks. In some examples, a triple or ternary tree partition divides a block into three sub-blocks without splitting the original block through its center. The partitioning types in MTT (e.g., QT, BT, and TT) can be symmetric or asymmetric.
[0050] When operating according to the AV1 codec, the Video Encoder 200 and Video Decoder 300 can be configured to encode video data in blocks. In AV1, the largest encoding block that can be processed is called a superblock. In AV1, a superblock can be 128x128 luma samples or 64x64 luma samples. Petition 870250090148, dated 03 / 10 / 2025, page 31 / 243 24 / 105 luma. However, in successor video encoding formats (e.g., AV2), a superblock can be defined by different (e.g., larger) luma sample sizes. In some examples, a superblock is the top level of a block quadtree. The Video 200 encoder can further partition a superblock into smaller encoding blocks. The Video 200 encoder can partition a superblock and other encoding blocks into smaller blocks using quadratic or non-quadratic partitioning. Non-quadratic blocks can include N / 2xN, NxN / 2, N / 4xN, and NxN / 4 blocks. The Video 200 encoder and the Video 300 decoder can perform separate prediction and transform processes on each of the encoding blocks.
[0051] AV1 also defines a video data tile. A tile is a rectangular array of superblocks that can be independently encoded from other tiles. That is, the 200 video encoder and the 300 video decoder can encode and decode, respectively, encoding blocks in a tile without using video data from other tiles. However, the 200 video encoder and the 300 video decoder can perform filtering between tile boundaries. Tiles can be of uniform or non-uniform size. Tile-based encoding can enable parallel and / or multi-threaded processing for encoder and decoder implementations.
[0052] In some examples, the 200 video encoder and the 300 video decoder may use a single QTBT or MTT structure to represent each of the luminance and chrominance components, while in others Petition 870250090148, dated 03 / 10 / 2025, page 32 / 243 25 / 105 examples, the 200 video encoder and the 300 video decoder can use two or more QTBT or MTT structures, such as one QTBT / MTT structure for the luminance component and another QTBT / MTT structure for both chrominance components (or two QTBT / MTT structures for the respective chrominance components).
[0053] The 200 video encoder and the 300 video decoder can be configured to use quadtree partition, QTBT partition, MTT partition, superblock partition, or other partition structures.
[0054] In some examples, a CTU includes a coding tree block (CTB) of luma samples, two corresponding CTBs of chroma samples from an image that has three sample arrays, or a CTB of samples from a monochrome image or an image that is encoded using three separate color planes and syntax structures used to encode the samples. A CTB can be an NxN block of samples for some value of N, so that dividing a component into CTBs is a partitioning. A component can be a single array or sample from one of the three arrays (luma and two chroma) for a 4:2:0, 4:2:2, or 4:4:4 color format image, or a single array or sample from the array for a monochrome format image. In some examples, a coding block is an M x N block of samples for some values of M and N, so that dividing a CTB into coding blocks is a partitioning.
[0055] Blocks (e.g., CTUs or CUs) can be grouped in various ways within an image. As an example, a brick can refer to a rectangular region. Petition 870250090148, dated 03 / 10 / 2025, p. 33 / 243 26 / 105 rows of CTUs in a particular tile in an image. A tile can be a rectangular region of CTUs in a particular column of tiles and a particular row of tiles in an image. A column of tiles refers to a rectangular region of CTUs that has a height equal to the height of the image and a width specified by syntax elements (for example, as in an image parameter set). A row of tiles refers to a rectangular region of CTUs that has a height specified by syntax elements (for example, as in an image parameter set) and a width equal to the width of the image.
[0056] In some examples, a tile can be partitioned into multiple bricks, each of which can include one or more rows of CTUs in the tile. A tile that is not partitioned into multiple bricks can also be called a brick. However, a brick that is a true subset of a tile may not be called a tile. The bricks in an image can also be arranged in a slice. A slice can be an integer number of bricks in an image that can be contained exclusively within a single network abstraction layer (NAL) unit. In some examples, a slice includes a number of complete tiles or just a consecutive sequence of complete bricks of a tile.
[0057] This disclosure can use NxN and N per N interchangeably refers to the sample dimensions of a block (such as a CU or another video block) in terms of vertical and horizontal dimensions, for example, 16x16 samples or 16 by 16 samples. Generally, a 16x16 CU will have 16 samples in one vertical direction (y = Petition 870250090148, dated 03 / 10 / 2025, page 34 / 243 27 / 105 16) and 16 samples in a horizontal direction (x = 16). Similarly, an NxN conventional array generally has N samples in a vertical direction and N samples in a horizontal direction, where N represents a non-negative integer. The samples in a conventional array can be arranged in rows and columns. Furthermore, conventional arrays do not necessarily have the same number of samples in the horizontal direction as in the vertical direction. For example, conventional arrays can comprise NxM samples, where M is not necessarily equal to N.
[0058] The Video Encoder 200 encodes video data into CUs that represent residual and / or prediction information and other information. Prediction information indicates how the CU should be predicted to form a prediction block for the CU. Residual information generally represents sample-by-sample differences between samples of the CU before encoding and the prediction block.
[0059] To predict a CU, the Video Encoder 200 can generally form a prediction block for the CU through interprediction or intraprediction. Interprediction generally refers to predicting the CU from data from a previously encoded image, while intraprediction generally refers to predicting the CU from previously encoded data from the same image. To perform interprediction, the Video Encoder 200 can generate the prediction block using one or more motion vectors. The Video Encoder 200 can generally perform a motion search to identify a reference block that closely matches the CU, for example, in terms of differences between the CU and the reference block. The Petition 870250090148, dated 03 / 10 / 2025, page 35 / 243 The 28 / 105 Video Encoder 200 can calculate a difference metric using a sum of absolute differences (SAD), a sum of squared differences (SSD), a mean absolute difference (MAD), mean squared differences (MSD), or other such difference calculations to determine whether a reference block closely matches the current CU. In some instances, the Video Encoder 200 can predict the current CU using one-way prediction or two-way prediction.
[0060] Some VVC examples also provide an affine motion compensation mode, which can be considered an interprediction mode. In affine motion compensation mode, the 200 video encoder can determine two or more motion vectors that represent non-translational motion, such as zooming in or out, rotation, perspective motion, or other types of irregular motion.
[0061] To perform intraprediction, the Video Encoder 200 can select an intraprediction mode to generate the prediction block. Some VVC examples provide sixty-seven intraprediction modes, including several directional modes, as well as planar mode and DC mode. Generally, the Video Encoder 200 selects an intraprediction mode that describes neighboring samples for a current block (e.g., a CU block), from which samples of the current block are predicted. Such samples can generally be above, above and to the left, or to the left of the current block in the same image as the current block, assuming the Video Encoder 200 Petition 870250090148, dated 03 / 10 / 2025, page 36 / 243 29 / 105 encodes CTUs and CUs in raster scan order (left to right, top to bottom).
[0062] The Video Encoder 200 encodes data representing the prediction mode for a current block. For example, for interprediction modes, the Video Encoder 200 can encode data representing which of the various available interprediction modes are used, as well as motion information for the corresponding mode. For one-way or two-way interprediction, for example, the Video Encoder 200 can encode motion vectors using Advanced Motion Vector Prediction (AMVP) or fusion mode. The Video Encoder 200 can use similar modes to encode motion vectors for affine motion compensation mode.
[0063] AV1 includes two general techniques for encoding and decoding a block of video data. The two general techniques are intraprediction (e.g., intraframe prediction or spatial prediction) and interprediction (e.g., interframe prediction or temporal prediction). In the context of AV1, when predicting blocks of a current video data frame using an intraprediction mode, the Video Encoder 200 and Video Decoder 300 do not use video data from other video data frames. For most intraprediction modes, the Video Encoder 200 encodes blocks of a current frame based on the difference between sample values in the current block and predicted values generated from reference samples in the same frame. The Video Encoder 200 determines the predicted values generated from the reference samples based on the intraprediction mode. Petition 870250090148, dated 03 / 10 / 2025, page 37 / 243 30 / 105
[0064] After prediction, such as intraprediction or interprediction of a block, the Video Encoder 200 can calculate residual data for the block. The residual data, such as a residual block, represents the sample by sample differences between the block and a prediction block for the block, formed using the corresponding prediction mode. The Video Encoder 200 can apply one or more transforms to the residual block to produce transformed data in a transform domain, rather than the sample domain. For example, the Video Encoder 200 can apply a discrete cosine transform (DCT), an integer transform, a wavelet transform, or a conceptually similar transform to the residual video data.Additionally, the Video 200 encoder can apply a secondary transform after the first transform, such as a mode-dependent non-separable secondary transform (MDNSST), a signal-dependent transform, a Karhunen-Loeve transform (KLT), or similar transforms. The Video 200 encoder produces transform coefficients after the application of one or more transforms.
[0065] As mentioned above, after any transformations to produce transform coefficients, the Video 200 encoder can perform quantization of the transform coefficients. Quantization generally refers to a process in which the transform coefficients are quantized to possibly reduce the amount of data used to represent the transform coefficients, providing the Petition 870250090148, dated 03 / 10 / 2025, page 38 / 243 31 / 105 Additional compression. When performing the quantization process, the Video 200 encoder can reduce the bit depth associated with some or all of the transform coefficients. For example, the Video 200 encoder can round an n-bit value to an m-bit value during quantization, where n is greater than m. In some instances, to perform quantization, the Video 200 encoder can perform a right shift in the bit direction of the value to be quantized.
[0066] After quantization, the Video 200 encoder can scan the transform coefficients, producing a one-dimensional vector from the two-dimensional array that includes the quantized transform coefficients. The scanning can be designed to place higher-energy (and therefore lower-frequency) transform coefficients at the front of the vector and lower-energy (and therefore higher-frequency) transform coefficients at the rear of the vector. In some examples, the Video 200 encoder may use a predefined scanning order to scan the quantized transform coefficients in order to produce a serialized vector and then entropically encode the quantized transform coefficients of the vector. In other examples, the Video 200 encoder may perform adaptive scanning.After scanning the quantized transform coefficients to form the one-dimensional vector, the Video 200 encoder can entropically encode the one-dimensional vector, for example, according to context-adaptive binary arithmetic coding (CABAC). The encoder... Petition 870250090148, dated 03 / 10 / 2025, page 39 / 243 32 / 105 of video 200 can also entropically encode values for syntax elements that describe metadata associated with the encoded video data for use by the video 300 decoder in decoding the video data.
[0067] To perform CABAC, the video encoder 200 can assign a context in a context model to a symbol to be transmitted. The context can refer, for example, to the possibility of neighboring values of the symbol being zero or non-zero values. Probability determination can be based on a context assigned to the symbol.
[0068] According to the techniques of this disclosure, the Video Encoder 200 can test a variety of transform types for a residual block of video data to determine whether a conventional transform or a low-frequency non-separable transform (LFNST), such as a KLT, should be applied to the block. The Video Encoder 200 can determine the transform type based on which transform type produces the best performance according to rate distortion optimization (RDO), for example, a Bjontegaard-Delta rate (BT). The Video Encoder 200 can additionally encode an index value indicative of the determined transform type, such as a low-frequency non-separable transform index value (lfnstIdx).
[0069] Video encoder 200 can use the value of lfnstIdx to determine whether to determine contexts for entropy coding transform coefficient values using conventional or other techniques. Petition 870250090148, dated 03 / 10 / 2025, page 40 / 243 33 / 105 according to the techniques of this disclosure. When the value of lfnstIdx is greater than zero, the context determination techniques of this disclosure can be used. In particular, instead of using a causal neighborhood to determine a context for a current transform coefficient (or a syntax element value for the current transform coefficient), the Video 200 encoder can determine the context according to values of a number (e.g., 5) of the most recently scanned transform coefficients (or the corresponding syntax element values for those transform coefficients) to determine the context for a current transform coefficient (or syntax element for the current transform coefficient) in scan order.
[0070] Generally, a transform coefficient value can be represented by a set of several syntax elements: a significant coefficient flag (indicating whether the absolute value of the coefficient is greater than zero), one or more greater-than-X flags (indicating whether the absolute value of the coefficient is greater than X), a sign flag, and a remainder value. The X value for the greater-than-X flags can be 1, 2, 3, or higher values. Thus, if a coefficient has a value of 0, the significant coefficient flag can have a value of 0, and the greater-than-X flags and the remainder flags do not need to be encoded. On the other hand, if a coefficient has an absolute value greater than zero, the significant coefficient flag would have a value of 1, and only those greater-than-X flags (and remainder value, if necessary) needed to represent the value would be encoded. Thus, for example, if a coefficient Petition 870250090148, dated 03 / 10 / 2025, page 41 / 243 If 34 / 105 has a value of 2, then the significant coefficient flag and the greater than 1 flag would have values of 1, the greater than 2 flag would have a value of 0, and the remaining value would not need to be encoded.
[0071] In this way, when determining the context for a current syntax element of a current transform coefficient, the 200 video encoder can refer to the corresponding syntax elements most recently encoded in scan order, rather than causal neighborhood. In this way, the transform coefficients used to determine the context for each syntax element can be different. The 200 video encoder can determine the context for the current syntax element of the current transform coefficient according to the sum of the most recently scanned syntax elements.
[0072] The Video Encoder 200 can additionally generate syntax data, such as block-based syntax data, picture-based syntax data, and sequence-based syntax data, for the Video Decoder 300, for example, in a picture header, a block header, a slice header, or other syntax data, such as a sequence parameter set (SPS), a picture parameter set (PPS), or a video parameter set (VPS). The Video Decoder 300 can similarly decode this syntax data to determine how to decode corresponding video data.
[0073] In this way, video encoder 200 can generate a bitstream that includes video data. Petition 870250090148, dated 03 / 10 / 2025, page 42 / 243 35 / 105 encoded, for example, syntax elements that describe the partitioning of an image into blocks (e.g., CUs) and residual and / or prediction information for the blocks. Finally, the 300 video decoder can receive the bitstream and decode the encoded video data.
[0074] In general, the video decoder Video encoder 300 performs a reciprocal process with respect to that performed by video encoder 200 to decode the encoded video data from the bitstream. For example, video encoder 300 can decode values for bitstream syntax elements using CABAC in a substantially similar, though reciprocal, manner to the CABAC encoding process of video encoder 200. Syntax elements can define partition information for partitioning an image into CTUs, and partitioning each CTU according to a corresponding partition structure, such as a QTBT structure, to define CTU CUs. Syntax elements can additionally define residual and prediction information for blocks (e.g., CUs) of video data.
[0075] Residual information can be represented, for example, by quantized transform coefficients. The Video Decoder 300 can inversely quantize and inversely transform the quantized transform coefficients of a block to reproduce a residual block for the block. The Video Decoder 300 uses a signaled prediction mode (intra- or interprediction) and related prediction information (e.g., motion information for interprediction) to form a prediction block for the block. The Video Decoder 300 Petition 870250090148, dated 03 / 10 / 2025, page 43 / 243 36 / 105 can then combine the prediction block and the residual block (on a sample-by-sample basis) to reproduce the original block. The 300 video decoder can perform additional processing, such as performing a deblocking process to reduce visual artifacts along the block boundaries.
[0076] According to the techniques of this disclosure, the Video Decoder 300 can decode a low-frequency non-separable transform index value (lfnstIdx) indicating a transform type for a current block. The Video Decoder 300 can determine if the lfnstIdx has a non-zero value. If the lfnstIdx value is non-zero, the Video Decoder 300 can use the techniques of this disclosure to determine contexts for entropic decoding transform coefficient syntax elements. In particular, for a current syntax element of a current transform coefficient, the Video Decoder 300 can add the values of the N (e.g., 5) previous transform coefficient syntax elements in scan order. In some examples, the Video Decoder 300 can select a context table to be used to determine the context according to the lfnstIdx value.In some examples, the 300 video decoder can determine the context according to a slice type for a slice including the block (for example, whether the slice is intrapredictive (an I slice), unidirectionally interpredictive (a P slice), or bidirectionally interpredictive (a B slice)).
[0077] This disclosure may refer to, Petition 870250090148, dated 03 / 10 / 2025, p. 44 / 243 37 / 105 generally refers to the signaling of certain information, such as syntax elements. The term signaling can generally refer to the communication of values for syntax elements and / or other data used to decode encoded video data. That is, the video encoder 200 can signal values for syntax elements in the bitstream. In general, signaling refers to the generation of a value in the bitstream. As mentioned above, the source device 102 can transport the bitstream to the destination device 116 substantially in real time or in non-real time, as can occur during the storage of syntax elements in the storage device 112 for later retrieval by the destination device 116.
[0078] Figure 2 is a block diagram illustrating an example Video 200 encoder that can perform the techniques of this disclosure. Figure 2 is provided for explanatory purposes and should not be considered limiting of the techniques, as extensively exemplified and described in this disclosure. For explanatory purposes, this disclosure describes the Video 200 encoder according to VVC (ITU-T H.266, under development) and HEVC (ITU-T H.265) techniques. However, the techniques of this disclosure can be performed by video encoding devices that are configured for other video encoding standards and video encoding formats, such as AV1 and successors to the AV1 video encoding format.
[0079] In the example in Figure 2, the video encoder 200 includes video data memory 230, mode selection unit 202, residual generation unit 204, unit Petition 870250090148, dated 03 / 10 / 2025, page 45 / 24338 / 105 transform processing unit 206, quantization unit 208, inverse quantization unit 210, inverse transform processing unit 212, reconstruction unit 214, filter unit 216, decoded picture buffer (DPB) 218, and entropic encoding unit 220. Any or all of the video data memory 230, mode selection unit 202, residual generation unit 204, transform processing unit 206, quantization unit 208, inverse quantization unit 210, inverse transform processing unit 212, reconstruction unit 214, filter unit 216, DPB 218, and entropic encoding unit 220 may be implemented in one or more processors or in a set of processing circuits.For example, the video encoder 200 units can be implemented as one or more circuits or logic elements as part of the hardware circuitry or as part of a processor, ASIC, or FPGA. Furthermore, the video encoder 200 can include additional or alternative processing circuits or sets to perform these and other functions.
[0080] Video data memory 230 can store video data to be encoded by the components of video encoder 200. Video encoder 200 can receive video data stored in video data memory 230 from, for example, video source 104 (Figure 1). DPB 218 can act as a reference image memory that stores reference video data for use in predicting subsequent video data by video encoder 200. Video data memory 230 and DPB 218 Petition 870250090148, dated 03 / 10 / 2025, page 46 / 243 39 / 105 can be formed by any of several memory devices, such as dynamic random access memory (DRAM), including synchronous DRAM (SDRAM), magnetoresistive random access memory (MRAM), resistive RAM (RRAM), or other types of memory devices. The video data memory 230 and the DPB 218 can be provided by the same memory device or by separate memory devices. In several examples, the video data memory 230 may be inside the chip with other video encoder components 200, as illustrated, or outside the chip relative to the components.
[0081] In this disclosure, the reference to video data memory 230 should not be interpreted as being limited to the internal memory of the video encoder 200, unless specifically described as such, or to the external memory of the video encoder 200, unless specifically described as such. Instead, the reference to video data memory 230 should be understood as a reference memory that stores video data that the video encoder 200 receives for encoding (e.g., video data for a current block to be encoded). Memory 106 in Figure 1 may also provide temporary storage of outputs from the various units of the video encoder 200.
[0082] The various units in Figure 2 are illustrated to aid in understanding the operations performed by the 200 video encoder. The units can be implemented as fixed-function circuits, programmable circuits, or a combination thereof. The circuits of Petition 870250090148, dated 03 / 10 / 2025, p. 47 / 243 40 / 105 Fixed-function circuits refer to circuits that provide particular functionality and are predefined in the operations that can be performed. Programmable circuits refer to circuits that can be programmed to perform various tasks and to provide flexible functionality in the operations that can be performed. For example, programmable circuits can execute software or firmware that makes the programmable circuits operate in the manner defined by the software or firmware instructions. Fixed-function circuits can execute software instructions (for example, to receive parameters or to emit parameters), but the types of operations that fixed-function circuits perform are generally immutable. In some examples, one or more of the units may be distinct circuit blocks (fixed-function or programmable), and in some examples, one or more of the units may be integrated circuits.
[0083] The Video Encoder 200 may include arithmetic logic units (ALUs), elementary function units (EFUs), digital circuits, analog circuits, and / or programmable cores, formed from programmable circuits. In examples where the Video Encoder 200 operations are performed using software executed by the programmable circuits, memory 106 (Figure 1) may store the instructions (e.g., object code) of the software that the Video Encoder 200 receives and executes, or another memory in the Video Encoder 200 (not shown) may store these instructions.
[0084] Video data memory 230 is configured to store received video data. The Petition 870250090148, dated 03 / 10 / 2025, page 48 / 243 The 41 / 105 video encoder 200 can retrieve an image from the video data in the video data memory 230 and provide the video data to the residual generation unit 204 and the mode selection unit 202. The video data in the video data memory 230 can be raw video data that needs to be encoded.
[0085] The mode selection unit 202 includes a motion estimation unit 222, a motion compensation unit 224, and an intraprediction unit 226. The mode selection unit 202 may include additional functional units to perform video prediction according to other prediction modes. As examples, the mode selection unit 202 may include a palette unit, an intrablock copy unit (which may be part of the motion estimation unit 222 and / or the motion compensation unit 224), an affine unit, a linear model (LM) unit, or similar units.
[0086] The mode selection unit 202 generally coordinates multiple coding passes to test combinations of coding parameters and resulting rate-distortion values for those combinations. Coding parameters may include partitioning of CTUs into CUs, prediction modes for the CUs, transform types for residual data of the CUs, quantization parameters for residual data of the CUs, etc. The mode selection unit 202 may ultimately select the combination of coding parameters with rate-distortion values that are better than the other combinations tested.
[0087] The 200 video encoder can Petition 870250090148, dated 03 / 10 / 2025, page 49 / 243 42 / 105 partitioning an image retrieved from the video data memory 230 into a series of CTUs and encapsulating one or more CTUs in a slice. The mode selection unit 202 can partition a CTU of the image according to a tree structure, such as the MTT structure, the QTBT structure, the superblock structure, or the quadtree structure described above. As described above, the video encoder 200 can form one or more CUs from the partitioning of a CTU according to the tree structure. This CU can also be generally called a video block or a block.
[0088] In general, the mode selection unit 202 also controls its components (e.g., motion estimation unit 222, motion compensation unit 224, and intraprediction unit 226) to generate a prediction block for a current block (e.g., a current CU or, in HEVC, the overlapping portion of a PU and a TU). For interprediction of a current block, the motion estimation unit 222 can perform a motion search to identify one or more closely matching reference blocks in one or more reference images (e.g., one or more previously encoded images stored in DPB 218).In particular, the 222 motion estimation unit can calculate a representative value of how similar a potential reference block is to the current block, for example, according to the sum of absolute differences (SAD), the sum of squared differences (SSD), the mean absolute difference (MAD), the mean squared differences (MSD), or similar methods. The 222 motion estimation unit can generally perform... Petition 870250090148, dated 03 / 10 / 2025, page 50 / 243 43 / 105 These calculations use sample-by-sample differences between the current block and the reference block that are considered. The motion estimation unit 222 can identify a reference block that has a lower value resulting from these calculations, indicating a reference block that corresponds more closely to the current block.
[0089] The motion estimation unit 222 can form one or more motion vectors (MVs) that define the positions of the reference blocks in the reference images relative to the position of the current block in a current image. The motion estimation unit 222 can then provide the motion vectors to the motion compensation unit 224. For example, for one-way interprediction, the motion estimation unit 222 can provide a single motion vector, while for two-way interprediction, the motion estimation unit 222 can provide two motion vectors. The motion compensation unit 224 can then generate a prediction block using the motion vectors. For example, the motion compensation unit 224 can retrieve data from the reference block using the motion vector.As another example, if the motion vector has fractional sample precision, the 224 motion compensation unit can interpolate values for the prediction block according to one or more interpolation filters. Furthermore, for bidirectional interprediction, the 224 motion compensation unit can retrieve data for two reference blocks identified by their respective motion vectors and can combine the retrieved data, for example, by averaging. Petition 870250090148, dated 03 / 10 / 2025, page 51 / 243 44 / 105 sample by sample or weighted average calculation. [00 90] When operating in accordance with the AV1 video encoding format, the motion estimation unit 222 and the motion compensation unit 224 can be configured to encode video data encoding blocks (e.g., both luma and chroma encoding blocks) using translational motion compensation, affine motion compensation, overlapped block motion compensation (OBMC), and / or composite inter / intraprediction.
[0091] As another example, for intraprediction or intraprediction coding, the 226 intraprediction unit can generate the prediction block from samples neighboring the current block. For example, for directional modes, the 226 intraprediction unit can generally mathematically combine the values of neighboring samples and fill in these calculated values in the direction defined in the current block to produce the prediction block. As another example, for DC mode, the 226 intraprediction unit can calculate an average of the neighboring samples for the current block and generate the prediction block to include this resulting average for each sample in the prediction block.
[0092] When operating in accordance with the AV1 video encoding format, the 226 intraprediction unit can be configured to encode video data encoding blocks (e.g., both luma and chroma encoding blocks) using directional intraprediction, non-directional intraprediction, recursive filter intraprediction, chroma prediction from luma (CFL - chroma). Petition 870250090148, dated 03 / 10 / 2025, page 52 / 243 45 / 105 from-luma), intrablock copy (IBC) and / or color palette mode. The 202 mode selection unit may include additional functional units to perform video prediction according to other prediction modes.
[0093] Mode selection unit 202 provides the prediction block to residual generation unit 204. Residual generation unit 204 receives a raw, unencoded version of the current block from video data memory 230 and the prediction block from mode selection unit 202. Residual generation unit 204 calculates sample-by-sample differences between the current block and the prediction block. The resulting sample-by-sample differences define a residual block for the current block. In some examples, residual generation unit 204 may also determine differences between sample values in the residual block to generate a residual block using residual differential pulse code modulation (RDPCM). In some examples, residual generation unit 204 may be formed using one or more subtractor circuits that perform binary subtraction.
[0094] In examples where the 202 mode selection unit partitions CUs into PUs, each PU can be associated with a luma prediction unit and corresponding chroma prediction units. The 200 video encoder and the 300 video decoder can support PUs that have various sizes. As indicated above, the size of a CU can refer to the size of the CU's luma encoding block, and the size of a PU can refer to the size of the PU's luma prediction unit. Assuming that the Petition 870250090148, dated 03 / 10 / 2025, p. 53 / 243 46 / 105 The size of a particular CU is 2Nx2N, the Video Encoder 200 can support PU sizes of 2Nx2N or NxN for intraprediction and symmetric PU sizes of 2Nx2N, 2NxN, Nx2N, NxN, or similar, for interprediction. The Video Encoder 200 and Video Decoder 300 can also support asymmetric partitioning for PU sizes of 2NxnU, 2NxnD, nLx2N and nRx2N for interprediction.
[0095] In instances where the 202 mode selection unit does not further partition a CU into PUs, each CU can be associated with a luma encoding block and corresponding chroma encoding blocks. As above, the size of a CU can refer to the size of the CU's luma encoding block. The 200 video encoder and the 300 video decoder can support CU sizes of 2Nx2N, 2NxN, or Nx2N.
[0096] For other video coding techniques, such as intrablock copy mode coding, affine mode coding, and linear model (LM) mode coding, as some examples, the mode selection unit 202, via the respective units associated with the coding techniques, generates a prediction block for the current block being coded. In some examples, such as palette mode coding, the mode selection unit 202 may not generate a prediction block and instead generates syntax elements that indicate the manner in which to reconstruct the block based on a selected palette. In these modes, the mode selection unit 202 may provide these syntax elements to the entropic coding unit 220 to be coded.
[0097] As described above, waste generation unit 204 receives the video data for the block Petition 870250090148, dated 03 / 10 / 2025, page 54 / 243 47 / 105 current and the corresponding prediction block. Residual generation unit 204 then generates a residual block for the current block. To generate the residual block, residual generation unit 204 calculates the sample-by-sample differences between the prediction block and the current block.
[0098] The transform processing unit 206 applies one or more transforms to the residual block to generate a transform coefficient block (referred to in the present invention as a transform coefficient block). The transform processing unit 206 can apply multiple transforms to a residual block to form the transform coefficient block. For example, the transform processing unit 206 can apply a discrete cosine transform (DCT), a directional transform, a Karhunen-Loeve transform (KLT), or a conceptually similar transform to a residual block. In some examples, the transform processing unit 206 can perform multiple transforms on a residual block, for example, a primary transform and a secondary transform, such as a rotational transform. In some examples, the transform processing unit 206 does not apply transforms to a residual block.
[0099] When operating in accordance with AV1, the transform processing unit 206 can apply one or more transforms to the residual block to generate a transform coefficient block (referred to in the present invention as a transform coefficient block). The transform processing unit 206 can apply multiple transforms to a residual block to form the transform coefficient block. For example, the unit of Petition 870250090148, dated 03 / 10 / 2025, page 55 / 243 48 / 105 Transform processing 206 can apply a combination of horizontal / vertical transforms that may include a discrete cosine transform (DCT), an asymmetric discrete sine transform (ADST), an inverted ADST (e.g., an ADST in reverse order), and an identity transform (IDTX). When an identity transform is used, the transform is skipped in either the vertical or horizontal direction. In some examples, transform processing may be skipped.
[00100] The quantization unit 208 can quantize the transform coefficients in a transform coefficient block to produce a block of quantized transform coefficients. The quantization unit 208 can quantize the transform coefficients of a transform coefficient block according to a quantization parameter (QP) value associated with the current block. The video encoder 200 (e.g., via the mode selection unit 202) can adjust the degree of quantization applied to the transform coefficient blocks associated with the current block by adjusting the QP value associated with the CU. Quantization can introduce loss of information, and therefore the quantized transform coefficients may have lower precision than the original transform coefficients produced by the transform processing unit 206.
[00101] The inverse quantization unit 210 and the inverse transform processing unit 212 can apply inverse quantization and inverse transforms in a Petition 870250090148, dated 03 / 10 / 2025, page 56 / 243 49 / 105 block of quantized transform coefficients, respectively, to reconstruct a residual block from the block of transform coefficients. Reconstruction unit 214 can produce a reconstructed block corresponding to the current block (although potentially with some degree of distortion) based on the reconstructed residual block and a prediction block generated by mode selection unit 202. For example, reconstruction unit 214 can add samples from the reconstructed residual block to the corresponding samples from the prediction block generated by mode selection unit 202 to produce the reconstructed block.
[00102] Filter unit 216 can perform one or more filter operations on reconstructed blocks. For example, filter unit 216 can perform unblocking operations to reduce blocking artifacts along the edges of the CUs. Filter unit 216 operations can be skipped in some instances.
[00103] When operating according to AV1, filter unit 216 can perform one or more filter operations on reconstructed blocks. For example, filter unit 216 can perform unblocking operations to reduce blocking artifacts along the edges of the CUs. In other examples, filter unit 216 can apply a constrained directional enhancement filter (CDEF), which can be applied after unblocking, and may include the application of non-separable non-linear low-pass directional filters, based on estimated edge directions. Filter unit 216 can also include a loop restoration filter, which is applied after the CDEF, and may include a symmetric normalized Wiener filter. Petition 870250090148, dated 03 / 10 / 2025, page 57 / 243 50 / 105 separable or a dual self-guided filter.
[00104] Video encoder 200 stores reconstructed blocks in DPB 218. For example, in instances where filter unit 216 operations are not performed, reconstruction unit 214 can store reconstructed blocks in DPB 218. In instances where filter unit 216 operations are performed, filter unit 216 can store the filtered reconstructed blocks in DPB 218. Motion estimation unit 222 and motion compensation unit 224 can retrieve a DPB 218 reference image, formed from the reconstructed (and potentially filtered) blocks, to interpredict blocks from subsequently encoded images. Additionally, intraprediction unit 226 can use reconstructed DPB 218 blocks from a current image to intrapredict other blocks in the current image.
[00105] In general, the entropic encoding unit 220 can entropically encode syntax elements received from other functional components of the video encoder 200. For example, the entropic encoding unit 220 can entropically encode quantized transform coefficient blocks from the quantization unit 208. As another example, the entropic encoding unit 220 can entropically encode prediction syntax elements (e.g., motion information for interprediction or intramode information for intraprediction) from the mode selection unit 202. The entropic encoding unit 220 can perform one or more entropic encoding operations on the syntax elements, which are a Petition 870250090148, dated 03 / 10 / 2025, page 58 / 243 51 / 105 Another example of video data, in order to generate entropically encoded data. For example, the 220 entropic coding unit can perform a context-adaptive variable length coding (CAVLC) operation, a CABAC operation, a variable-to-variable (V2V) coding operation, a syntax-based context-adaptive binary arithmetic coding (SBAC) operation, a probability interval partitioning entropy (PIPE) coding operation, an Exponential-Golomb coding operation, or another type of entropic coding operation on the data. In some examples, the 220 entropic encoding unit can operate in bypass mode, where syntax elements are not entropically encoded.
[00106] The entropic encoding unit 220 can be configured to perform any of the various techniques of this disclosure. For example, the entropic encoding unit 220 can determine a context for entropic encoding of one or more syntax elements of a current transform coefficient using one or more immediately preceding encoded transform coefficients, as discussed in the present invention.
[00107] For example, the entropic encoding unit 220 can be configured to determine whether the mode selection unit 202 has determined that a block should be transformed using a conventional transform or a low-frequency non-separable transform, for example, Petition 870250090148, dated 03 / 10 / 2025, page 59 / 243 52 / 105 based on a value of an lfnstIdx for the block. In the case of the lfnstIdx having a non-zero value, the 220 entropic encoding unit can determine contexts for encoding syntax elements for transform coefficients (e.g., significant coefficient flags, greater than X flags, sign flags, remaining values, and / or last significant coefficient flags) using the most recently encoded K transform coefficient values (where K can be a positive integer value, e.g., 5).
[00108] In some examples, the 220 entropic encoding unit can determine contexts according to the sum of the values of the K-transform coefficients. In some examples, the 220 entropic encoding unit can determine contexts according to the sum of the values of the corresponding syntax elements of the K-transform coefficients. In some examples, the 220 entropic encoding unit can determine contexts using different context tables according to the value of lfnstIdx.
[00109] Video encoder 200 can output a bitstream that includes the entropically encoded syntax elements needed to reconstruct blocks of a slice or image. In particular, entropic encoding unit 220 can output the bitstream.
[00110] According to AV1, the 220 entropic encoding unit can be configured as an adaptive symbol-to-symbol multisymbol arithmetic encoder. A syntax element in AV1 includes an alphabet of N elements and a context (e.g., model). Petition 870250090148, dated 03 / 10 / 2025, page 60 / 243 The 53 / 105 probability set includes a set of N probabilities. The 220 entropic encoding unit can store the probabilities as n-bit cumulative distribution functions (CDFs) (e.g., 15 bits). The 22 entropic encoding unit can perform recursive scaling, with an update factor based on alphabet size, to update the contexts.
[00111] The operations described above are described in relation to a block. This description should be understood as operations for a luma encoding block and / or for chroma encoding blocks. As described above, in some examples, the luma encoding block and the chroma encoding blocks are luma and chroma components of a CU. In some examples, the luma encoding block and the chroma encoding blocks are luma and chroma components of a PU.
[00112] In some examples, the operations performed on a luma coding block do not need to be repeated for the chroma coding blocks. As an example, the operations to identify a motion vector (MV) and a reference image for a luma coding block do not need to be repeated to identify an MV and a reference image for the chroma blocks. Instead, the MV for the luma coding block can be scaled to determine the MV for the chroma blocks, and the reference image can be the same. As another example, the intraprediction process can be the same for the luma coding block and for the chroma coding blocks.
[00113] In this way, the video encoder Petition 870250090148, dated 03 / 10 / 2025, page 61 / 243 54 / 105 Figure 200 represents an example of a device for encoding (encoding and decoding) video data, the device including: a memory configured to store video data; and a processing system comprising one or more processors implemented in a circuit assembly, the processing system being configured to: determine a context for context-based encoding of a current transform coefficient of a current block of video data according to previously encoded transform coefficients, the previously encoded transform coefficients being a sequence of transform coefficients immediately preceding the current transform coefficient in scan order; and context-based encoding of the current transform coefficient using the determined context.
[00114] Figure 3 is a block diagram illustrating an example 300 video decoder that can perform the techniques of this disclosure. Figure 3 is provided for explanatory purposes and is not limiting of the techniques as extensively exemplified and described in this disclosure. For explanatory purposes, this disclosure describes the 300 video decoder according to VVC (ITU-T H.266, under development) and HEVC (ITU-T H.265) techniques. However, the techniques of this disclosure can be performed by video encoding devices that are configured for other video encoding standards.
[00115] In the example in Figure 3, the video decoder 300 includes a coded picture buffer (CPB) memory 320, a decoding unit. Petition 870250090148, dated 03 / 10 / 2025, page 62 / 243 55 / 105 entropic 302, prediction processing unit 304, inverse quantization unit 306, inverse transform processing unit 308, reconstruction unit 310, filter unit 312, and decoded picture buffer (DPB) 314. Any or all of the CPB memory 320, the entropic decoding unit 302, the prediction processing unit 304, the inverse quantization unit 306, the inverse transform processing unit 308, the reconstruction unit 310, the filter unit 312, and the DPB 314 may be implemented in one or more processors or in a set of processing circuits. For example, the 300 video decoder units can be implemented as one or more circuits or logic elements as part of a hardware circuit assembly or as part of a processor, ASIC, or FPGA.In addition, the 300 video decoder may include additional or alternative processors or circuitry to perform these and other functions.
[00116] Prediction processing unit 304 includes a motion compensation unit 316 and an intraprediction unit 318. Prediction processing unit 304 may include additional units to perform prediction according to other prediction modes. As examples, prediction processing unit 304 may include a palette unit, an intrablock copy unit (which may be part of motion compensation unit 316), an affine unit, a linear model (LM) unit, or similar units. In other examples, video decoder 300 may include more, fewer, or different functional components.
[00117] When operating according to AV1, the unit Petition 870250090148, dated 03 / 10 / 2025, page 63 / 243 The 56 / 105 motion compensation unit 316 can be configured to decode video data encoding blocks (e.g., both luma and chroma encoding blocks) using translational motion compensation, affine motion compensation, OBMC, and / or composite inter-intraprediction, as described above. The intraprediction unit 318 can be configured to decode video data encoding blocks (e.g., both luma and chroma encoding blocks) using directional intraprediction, non-directional intraprediction, recursive filter intraprediction, CFL, intrablock copy (IBC), and / or color palette mode, as described above.
[00118] The CPB 320 memory can store video data, such as an encoded video bitstream, to be decoded by the components of the video decoder 300. The video data stored in the CPB 320 memory can be obtained, for example, from computer-readable media 110 (Figure 1). The CPB 320 memory may include a CPB that stores encoded video data (e.g., syntax elements) of an encoded video bitstream. In addition, the CPB 320 memory may store video data beyond the syntax elements of an encoded image, such as temporary data representing outputs from the various units of the video decoder 300. The DPB 314 generally stores decoded images, which the video decoder 300 can output and / or use as reference video data when decoding subsequent data or images from the encoded video bitstream.The memory of CPB 320 and DPB 314 can be formed by any of several memory devices, such as dynamic memory. Petition 870250090148, dated 03 / 10 / 2025, page 64 / 243 57 / 105 Random Access Memory (DRAM), including synchronous DRAM (SDRAM), magnetoresistive RAM (MRAM), resistive RAM (RRAM), or other types of memory devices. The CPB 320 memory and the DPB 314 memory may be provided by the same memory device or by separate memory devices. In several instances, the CPB 320 memory may be on-chip with other Video Decoder 300 components or off-chip relative to the components.
[00119] Additionally or alternatively, in some examples, the video decoder 300 can retrieve encoded video data from memory 120 (Figure 1). That is, memory 120 can store data, as discussed above, with CPB memory 320. Similarly, memory 120 can store instructions to be executed by the video decoder 300, when some or all of the video decoder 300 functionalities are implemented in software to be executed by the video decoder 300 processing circuitry.
[00120] The various units shown in Figure 3 are illustrated to aid in understanding the operations performed by the 300 video decoder. The units can be implemented as fixed-function circuits, programmable circuits, or a combination thereof. Similar to Figure 2, fixed-function circuits refer to circuits that provide particular functionality and are predefined in the operations that can be performed. Programmable circuits refer to circuits that can be programmed to perform various tasks and to provide flexible functionality in the operations that can be performed. For example, programmable circuits can Petition 870250090148, dated 03 / 10 / 2025, page 65 / 243 58 / 105 execute software or firmware that causes programmable circuits to operate in the manner defined by the software or firmware instructions. Fixed-function circuits can execute software instructions (for example, to receive parameters or to emit parameters), but the types of operations that fixed-function circuits perform are generally immutable. In some examples, one or more of the units may be distinct circuit blocks (fixed-function or programmable), and in some examples, one or more of the units may be integrated circuits.
[00121] The 300 video decoder may include ALUs, EFUs, digital circuits, analog circuits, and / or programmable cores, formed from programmable circuits. In examples where the operations of the 300 video decoder are performed by software running on the programmable circuits, the on-chip memory or off-chip memory may store instructions (e.g., object code) from the software that the 300 video decoder receives and executes.
[00122] The entropic decoding unit 302 can receive encoded video data from the CPB and entropically decode the video data to reproduce syntax elements. The prediction processing unit 304, the inverse quantization unit 306, the inverse transform processing unit 308, the reconstruction unit 310, and the filter unit 312 can generate decoded video data based on the syntax elements extracted from the bitstream.
[00123] In particular, the entropic decoding unit 302 can entropically decode Petition 870250090148, dated 03 / 10 / 2025, page 66 / 243 59 / 105 is a low-frequency non-separable transform index (lfnstIdx) value for a current block of video data. The 302 entropic decoding unit can then determine how to entropically decode the transform coefficients of the current block based on the lfnstIdx value. For example, if the lfnstIdx value is greater than zero, the 302 entropic decoding unit can determine contexts for the current block's entropic decoding transform coefficients according to immediately preceding transform coefficient values in scan order. The 302 entropic decoding unit can select a context table according to the lfnstIdx value in some instances.
[00124] In general, the 300 video decoder reconstructs an image on a block-by-block basis. The 300 video decoder can perform a reconstruction operation on each block individually (where the block that is currently being reconstructed, i.e., decoded, can be called the current block).
[00125] The entropic decoding unit 302 can entropically decode syntax elements that define quantized transform coefficients of a block of quantized transform coefficients, as well as transform information such as a quantization parameter (QP) and / or transform mode indication(s). The inverse quantization unit 306 can use the QP associated with the block of quantized transform coefficients to determine a degree of quantization and, similarly, a degree of inverse quantization for the unit. Petition 870250090148, dated 03 / 10 / 2025, page 67 / 243 60 / 105 inverse quantization 306 apply. The inverse quantization unit 306 can, for example, perform a left shift operation in the bit direction to inversely quantize the quantized transform coefficients. The inverse quantization unit 306 can thus form a block of transform coefficients that includes transform coefficients.
[00126] The entropic decoding unit 302 can be configured to perform any of the various techniques of this disclosure. For example, the entropic decoding unit 302 can determine a context for entropic decoding of one or more syntax elements of a current transform coefficient using one or more immediately previously decoded transform coefficients, as discussed in the present invention.
[00127] After the inverse quantization unit 306 forms the transform coefficient block, the inverse transform processing unit 308 can apply one or more inverse transforms to the transform coefficient block to generate a residual block associated with the current block. For example, the inverse transform processing unit 308 can apply an inverse DCT, an inverse integer transform, an inverse Karhunen-Loeve transform (KLT), an inverse rotational transform, an inverse directional transform, or another inverse transform to the transform coefficient block.
[00128] In addition, prediction processing unit 304 generates a prediction block according to the syntax elements of the prediction information that were entropically decoded by the decoding unit. Petition 870250090148, dated 03 / 10 / 2025, page 68 / 243 61 / 105 entropic 302. For example, if the prediction information syntax elements indicate that the current block is interpredicted, the motion compensation unit 316 can generate the prediction block. In this case, the prediction information syntax elements can indicate a reference image in DBP 314 from which a reference block can be retrieved, as well as a motion vector that identifies a location of the reference block in the reference image relative to the location of the current block in the current image. The motion compensation unit 316 can generally perform the interprediction process in a manner that is substantially similar to that described in relation to the motion compensation unit 224 (Figure 2).
[00129] As another example, if the prediction information syntax elements indicate that the current block is intrapredicted, the intraprediction unit 318 can generate the prediction block according to an intraprediction mode indicated by the prediction information syntax elements. Again, the intraprediction unit 318 can generally perform the intraprediction process in a manner that is substantially similar to that described in relation to the intraprediction unit 226 (Figure 2). The intraprediction unit 318 can retrieve data from samples neighboring the current DPB block 314.
[00130] Reconstruction unit 310 can reconstruct the current block using the prediction block and the residual block. For example, reconstruction unit 310 can add samples from the residual block to the corresponding samples from the prediction block to reconstruct the current block. Petition 870250090148, dated 03 / 10 / 2025, page 69 / 243 62 / 105
[00131] Filter unit 312 can perform one or more filter operations on reconstructed blocks. For example, filter unit 312 can perform unblocking operations to reduce blocking artifacts along the edges of reconstructed blocks. Filter unit 312 operations are not necessarily performed in all instances.
[00132] Video decoder 300 can store reconstructed blocks in DPB 314. For example, in instances where filter unit 312 operations are not performed, reconstruction unit 310 can store reconstructed blocks in DPB 314. In instances where filter unit 312 operations are performed, filter unit 312 can store filtered reconstructed blocks in DPB 314. As discussed above, DPB 314 can provide reference information, such as samples of a current image for intraprediction and previously decoded images for subsequent motion compensation, to the prediction processing unit 304. Furthermore, video decoder 300 can output decoded images (e.g., decoded video) from DPB 314 for subsequent presentation on a display device, such as display device 118 in Figure 1.
[00133] In this way, the 300 video decoder represents an example of a device for decoding video data, wherein the device comprises: a memory configured to store video data; and a processing system comprising one or more processors implemented in a circuit assembly, the processing system being configured to: Petition 870250090148, dated 03 / 10 / 2025, page 70 / 243 63 / 105 determine a context for context-based encoding of a current transform coefficient of a current block of video data according to previously encoded transform coefficients, the previously encoded transform coefficients being a sequence of transform coefficients immediately preceding the current transform coefficient in scan order; and context-based encoding of the current transform coefficient using the determined context.
[00134] Figure 4 is a conceptual diagram illustrating an example two-dimensional causal neighborhood in which template 332 of transform coefficients neighbors 334 for current coefficient 330 can be used to determine a context for encoding the current coefficient 330. In this example, template 332 includes five causal coefficients neighbors. In particular, Figure 4 depicts the transform block 336 including the current coefficient 330 and the transform coefficients neighbors 334. Template 332 represents a subset of transform coefficients neighbors 334 that can be used to determine a context for encoding the current coefficient 330, in some examples.
[00135] In conventional video coding standards, such as ITU-T H.266 / Versatile Video Coding (VVC), context model selection for syntax element values, such as the significant coefficient flag (sig_abs_level_greaterX_flag) and the coefficient absolute level greater than X flag (coeff_abs_level_greaterX_flag) (e.g., where X can be equal to 1, 2, 3, or 4), as well as the selection of Petition 870250090148, dated 03 / 10 / 2025, page 71 / 243 The 64 / 105 binarization code for the coeff_abs_level_remaining syntax element (indicating a remaining value if the coefficient has an absolute value greater than the highest X flag, for example, 4) is based on previously encoded absolute values in a neighborhood, such as template 332. The size and format of the local template used in VVC are shown in Figure 4. Each square represents a scan position, and the square marked with an o denotes the current scan position (i.e., current coefficient 330). Light gray scan positions are those that have already been processed, and dark gray scan positions are those that have been processed and are covered by template 332, i.e., the positions that are considered for the evaluation of the current coefficient 330.
[00136] The following pseudocode represents an example process for encoding transform coefficient level values: table[2][2]={{0,2},{2,0},{3,l}{ 1,3}} state = 0 for( subblkld ) { for( scanld inside subblock ) { quantld = (state » 1 ) code level (using binarization) state = table[ state ][ level & 1 ]
[00137] For real context selection by VVC, the sum of absolute transform coefficient levels and the number of significant neighboring positions within the template are determined. These values are used to Petition 870250090148, dated 03 / 10 / 2025, page 72 / 243 65 / 105 derive the context model index and the Rice parameter. A video encoder can determine a final context offset using a coefficient position in a current block. For VVC, the final context model index, ctxld, is derived as follows: ctxld = contextTable[posX][posY][offset(sum(Abs(coeff)))]
[00138] Figure 5 is a conceptual diagram illustrating an example of context shift zones for a significant coefficient flag. Figure 5 depicts block 400, including coefficient positions corresponding to each of the 64 boxes within block 400. The three upper left boxes are lightly shaded to indicate a first shift zone. The shaded boxes represent a second shift zone. The white boxes represent a third shift zone.
[00139] For the first bln of a truncated unary codeword, also called the significance bin sig_coeff_flag, the chosen context depends on the diagonal position within the transform block 336, the quantizer used, and the sum of the absolute transform coefficient levels within the template 332. The quantizer used is specified by quantld, which is derived as specified by the pseudocode above. A separate context model is used for the last significant coefficient.
[00140] For the second bin of the truncated unary code, also called the greaterl flag significance bin, the chosen context depends on the diagonal position within the 336 transform block, the quantizer used, and the sum of the absolute transform coefficient levels greater than 1 within the 332 template. Petition 870250090148, dated 03 / 10 / 2025, page 73 / 243 66 / 105
[00141] For the remaining bins of the truncated unary code portion, the chosen context depends on the diagonal position within the 336 transform block, the quantizer used, and the sum of absolute transform coefficient levels greater than 1 within the 332 template. A separate context model is used for the last significant coefficient.
[00142] The Rice parameter is determined based on the number of absolute transform coefficient levels greater than 1.
[00143] Figure 6 is a conceptual diagram illustrating an inverse Karhunen-Loeve transform (KLT) transform process. According to the techniques of this disclosure, instead of using a template of neighboring transform coefficients to determine contexts for encoding transform coefficient syntax element values, as discussed in relation to Figure 4, the 200 video encoder and the 300 video decoder can, in certain cases, determine contexts from a number of immediately preceding transform coefficients in a one-dimensional array for the current transform coefficient.
[00144] That is, the video encoder 200, for example, can apply a KLT-based transform to a residual block of video data to form a transform block. The video encoder 200 can then serialize the transform block from a two-dimensional array to a one-dimensional vector (also called a one-dimensional array). Furthermore, the video encoder 200 can quantize the transform coefficients. The encoder of Petition 870250090148, dated 03 / 10 / 2025, page 74 / 243 67 / 105 video 200 can then encode each transform coefficient in the vector / array in order, using transform coefficients immediately preceding the current transform coefficient to determine contexts for encoding the current transform coefficient.
[00145] The 300 video decoder can similarly receive a series of transform coefficients encoded in the bitstream. The 300 video decoder can determine a context for entropic decoding of a current transform coefficient using a number of the immediately preceding, previously decoded transform coefficients, after entropic decoding of the current transform coefficient using the determined context. The 300 video decoder can also inversely quantize the transform coefficients. The 300 video decoder can inversely serialize (inverse scan) the one-dimensional vector of transform coefficients to reconstruct a transform block, such as a 2D block with input coefficients M 340, as shown in Figure 6.The video decoder 300 can then apply an inverse KLT-based transform, for example, input rearrangement 342 and M x N transform matrix 344, to reconstruct residual values in a 2D block / array 246 (e.g., a residual block).
[00146] As shown in Figure 6, a KLT-based transform decoding process can be specified as follows: • Reorganization patterns / sweeps, which are used to define transform input coefficients based on KLT and Petition 870250090148, dated 03 / 10 / 2025, page 75 / 243 68 / 105 residual output values are organized or grouped. This corresponds to input reorganization 342. • A transform matrix, defining a non-separable transform used on all or a subset of the inverse quantized coefficients. This corresponds to the transform matrix M x N 344.
[00147] In KLT-based transforms, a 2D block / array of decoded coefficients can be arranged to align the matrix and input inputs. This can be achieved by constructing a 1D list of coefficients M from the 2D array of coefficients, then applying an inverse KLT-based transform (of size M x N) to the 1D list to reconstruct the residual block.
[00148] Figure 7 is a conceptual diagram illustrating an example of rearranging decoded coefficients into a one-dimensional vector. In the example in Figure 7, the transform coefficients of block 348 are rearranged into a one-dimensional vector 349. This rearrangement in the example in Figure 7 is performed according to a diagonal scan. In other examples, such rearrangement can be performed according to a sub-block diagonal scan.
[00149] In some examples, in order to decode a coefficient at position (x, y) in a 2D array of coefficients that maps to position m in a rearranged 1D array, the 300 video decoder can use a previous N transform coefficient on the order of Petition 870250090148, dated 03 / 10 / 2025, page 76 / 243 69 / 105 encoding to model contexts for a current transform coefficient, instead of using the causal 2D neighborhood. In VVC, a low-frequency non-separable transform index (lfnstIdx) is flagged after all coefficients in a coding unit (CU). However, according to the techniques in this disclosure, the value of lfnstIdx can be used to analyze transform coefficients because the value of lfnstIdx can be used for context modeling for one or more syntax elements, such as sig_coeff_flag, coeff_abs_level_greaterX_flag, and for deriving a Rice parameter to analyze the remaining coefficient value. In this way, the 300 video decoder can be configured to analyze the value of lfnstIdx after all last_sig_coeff_pos syntax elements in a CU.
[00150] For intra sub-partitioning prediction (ISP) mode, lfnstIdx is signaled only for a last transform unit (TU). For dual-tree chroma encoding, if both chroma components (Cb and Cr) are available and neither is encoded using transform skip mode (TS transform skip), lfnstIdx can be parsed for only one of the chroma components.
[00151] In some examples, such as in ECM, the LFNST is used to further improve the performance of a primary transform. After decoding the position of the last significant coefficient, the 300 video decoder can analyze the lfnstIdx. If lfnstIdx is equal to 0, the 300 video decoder can perform the process of Petition 870250090148, dated 03 / 10 / 2025, page 77 / 243 70 / 105 decoding of coefficients according to ECM. However, if lfnstIdx is greater than 0, according to the techniques of this disclosure, the 300 video decoder can perform context modeling for decoding, for example, sig_coeff_flag and coeff_abs_level_greaterX_flag, and also to set the Rice parameter to decode the remainder of the coefficient using a number (e.g., 5) of previous LFNST coefficients. For example, in Figure 7, when coefficient 5 is decoded, the absolute values of coefficients 2, 12, 9, 6, and 3 are used to model the context for coefficient 5.
[00152] In some examples, the number of preceding coefficients to be used to determine the context may vary depending on the block size. For example, if the current block is 4x4, the number may be 5, whereas if the current block is 8x8, the number may be 6.
[00153] In some examples, such as in ECM, nonseparable primary transforms (NSPTs) are used to replace the combination of a primary transform and an LFNST. In such examples, after decoding the position of the last significant coefficient, the 300 video decoder can analyze an NPST index (nsptIdx). If nsptIdx equals 0, the 300 video decoder can perform the decoding process for the coefficients according to ECM. However, if nsptdx is greater than 0, the 300 video decoder can perform context modeling for decoding, for example, sig_coeff_flag and coeff_abs_level_greaterX_flag, and also to set the Rice parameter to decode the remainder of the coefficient. Petition 870250090148, dated 03 / 10 / 2025, page 78 / 243 71 / 105 is calculated using a number (for example, 5) of previous NSPT coefficients. In some examples, if the block size is 4x4, the number might be 5. In some examples, if the block size is 8x8, the number might be 6.
[00154] In some examples, context decoding for each type of transform can be performed using a separate context table.
[00155] In some examples, for instance, for ECM, after decoding the position of the last significant coefficient, the low-frequency non-separable transform index (IfnstIdx) can be analyzed. If IfnstIdx equals 0, a regular coefficient context table (contextTableRegularCoeff) can be used. For IfnstIdx > 0, an LFNST coefficient context table (contextTableLfnstCoeff) can be used. Example pseudocode for these techniques is shown below: contextTable = (lfnstIdx>0) ? contextTableLfnstCoeff: context! abl eRegul arCoeff ctxld = contextTable[posX][posY][offset(sum(Abs(coeff)))]
[00156] In some examples, the context selection may depend on a slice type. For example, if the slice is a slice I, the context may be selected according to whether IfnstIdx is greater than zero or not. However, if the slice is a slice B, all transforms may use the same context table.
[00157] In some examples, context decoding for some transforms may involve determining a context shift that depends on the position of the current coefficient in the scan order, rather than the (x, y) position of the coefficient in the current block. Petition 870250090148, dated 03 / 10 / 2025, page 79 / 243 72 / 105
[00158] In some examples, for instance, according to VVC, after decoding the position of the last significant coefficient, Ifnstldx is parsed. If Ifnstldx equals 0, the context index (ctxld) can be determined according to contextTable[posX][posY][offset(sum(Abs(coeff)))]. If Ifnstldx is greater than 0, ctxld can be determined according to contextTable[scanPos][offset(sum(Abs(coeff)))].
[00159] In some examples, for instance, according to VVC, after decoding the position of the last significant coefficient, Ifnstldx is parsed. Then, the following two steps can be performed to determine the context index: Step 1: Define the context table used: contextTable = (lfnst!dx>0) ? contextTableLfnstCoeff: contextTableRegularCoeff Step 2: Determine the displacement based on the position (x,y) / scanPos: If Ifnstldx is equal to 0, ctxld = contextTable[posX][posY][offset(sum(Abs(coeff)))], if Ifnstldx > 0, ctxld = contextTable[scanPos][offset(sum(Abs(coeff)))]
[00160] In the pseudocode examples above, the notation condition ? X : Y indicated that if the condition is true, X is returned, while if the condition is false, Y is returned.
[00161] Figure 8 is a flowchart illustrating an example method for encoding a current block according to the techniques of the present disclosure. The current block may comprise a current CU. Although described in relation to the Video 200 encoder (Figures 1 and 2), it should be Petition 870250090148, dated 03 / 10 / 2025, page 80 / 243 73 / 105 understood that other devices can be configured to perform a method similar to that in Figure 8.
[00162] In this example, the video encoder 200 initially predicts the current block (350). For example, video encoder 200 can form a prediction block for the current block. Video encoder 200 can then calculate a residual block for the current block (352). To calculate the residual block, video encoder 200 can calculate a difference between the original, unencoded block and the prediction block for the current block. Video encoder 200 can then transform the residual block and quantize the transform coefficients of the residual block (354). For example, video encoder 200 can transform the residual block using a KLT-based transform. Then, video encoder 200 can scan the quantized transform coefficients of the residual block (356). During or after scanning, video encoder 200 can entropically encode the transform coefficients (358).For example, the video encoder 200 can encode transform coefficients using CABAC. According to the techniques of this disclosure, the video encoder 200 can determine a context for entropic encoding of a transform coefficient according to several immediately previously encoded transform coefficients, as discussed in the present invention. The video encoder 200 can then output the entropically encoded block (360) data.
[00163] The 200 video encoder can also decode the current block after encoding the current block, for Petition 870250090148, dated 03 / 10 / 2025, page 81 / 243 74 / 105 use the decoded version of the current block as reference data for subsequently encoded data (e.g., in interprediction or intraprediction modes). In this way, the video encoder 200 can inversely quantize and inversely transform the coefficients to reproduce the residual block (362). For example, the video encoder 200 can apply a KLT-based inverse transform. The video encoder 200 can combine the residual block with the prediction block to form a decoded block (364). The video encoder 200 can then store the decoded block in DPB 218 (366).
[00164] In this way, the method in Figure 8 represents an example of a video data encoding method including determining a context for context-based encoding of a current transform coefficient of a current block of video data according to previously encoded transform coefficients, the previously encoded transform coefficients being a sequence of transform coefficients immediately preceding the current transform coefficient; and context-based encoding of the current transform coefficient using the determined context.
[00165] Figure 9 is a flowchart illustrating an example method for decoding a current block of video data according to the techniques of this disclosure. The current block may comprise a current CU. Although described in relation to the 300 video decoder (Figures 1 and 3), it should be understood that other devices may be configured to perform a method similar to that in Figure 9.
[00166] The 300 video decoder can receive Petition 870250090148, dated 03 / 10 / 2025, page 82 / 243 75 / 105 entropically encoded data for the current block, such as entropically encoded prediction information and entropically encoded data for transform coefficients of a residual block corresponding to the current block (370). The video decoder 300 can entropically decode the entropically encoded data to determine prediction information for the current block and to reproduce transform coefficients of the residual block (372). According to the techniques of this disclosure, the video decoder 300 can determine a context for entropic decoding of a transform coefficient according to several immediately previously decoded transform coefficients, as discussed in the present invention.Video decoder 300 can predict the current block (374), for example, using an intra- or interprediction mode, as indicated by the prediction information for the current block, to calculate a prediction block for the current block. Video decoder 300 can then inversely scan the reproduced transform coefficients (376) to create a block of quantized transform coefficients. Video decoder 300 can then inversely quantize the transform coefficients and apply an inverse transform to the transform coefficients to produce a residual block (378). For example, video decoder 300 can apply a KLT-based inverse transform. Video decoder 300 can finally decode the current block by combining the prediction block and the residual block (380).
[00167] In this way, the method in Figure 9 represents an example of a video data encoding method including determining a context for encoding. Petition 870250090148, dated 03 / 10 / 2025, page 83 / 243 76 / 105 context-based encoding of a current transform coefficient of a current block of video data according to previously encoded transform coefficients, the previously encoded transform coefficients being a sequence of transform coefficients immediately preceding the current transform coefficient; and context-based encoding of the current transform coefficient using the determined context.
[00168] Figure 10 is a flowchart illustrating an example method of determining encoding transform coefficients according to the techniques in this disclosure. The method in Figure 10 can be performed by the video encoder 200 of Figures 1 and 2 or by the video decoder 300 of Figures 1 and 3. Other video encoding devices (encoding and / or decoding) can perform similar techniques. For example and explanation purposes, the method in Figure 10 is described in relation to the video decoder 300. The method in Figure 10 can generally correspond to step 354 of the method in Figure 8 or to step 378 of the method in Figure 9.
[00169] Initially, in this example, video decoder 300 determines a low-frequency non-separable transform index value (lfnstIdx) for a current block of video data (400). Video decoder 300 can then determine a context determination mechanism for entropic decoding transform coefficients using the lfnstIdx value (402). In this example, it is assumed that the lfnstIdx value has a non-zero value.
[00170] In this way, the video decoder Petition 870250090148, dated 03 / 10 / 2025, page 84 / 243 77 / 105 300 can, for each transform coefficient of the current block, determine a context for entropic decoding of the transform coefficient according to the values of the immediately preceding K transform coefficients (e.g., 5) in scan order. In particular, the video decoder 300 can determine the values of the previous K transform coefficients for a current transform coefficient (404), calculate a sum of the previous K transform coefficients (406), and determine the context for the current transform coefficient from the sum (408). The video decoder 300 can then decode the current transform coefficient using the determined context (410).
[00171] In this way, the method in Figure 10 represents an example of a video data decoding method including determining a context for context-based encoding of a current transform coefficient of a current block of video data according to previously encoded transform coefficients, the previously encoded transform coefficients being a sequence of transform coefficients immediately preceding the current transform coefficient in scan order; and context-based encoding of the current transform coefficient using the determined context.
[00172] Figure 11 is a flowchart illustrating another example method of determining encoding transform coefficients according to the techniques of this disclosure. The method in Figure 11 can be performed by the video encoder 200 of Figures 1 and 2 or by the video decoder 300 of Figures 1 and 3. Other Petition 870250090148, dated 03 / 10 / 2025, page 85 / 243 78 / 105 video encoding devices (encoding and / or decoding) can perform similar techniques. For example and explanation purposes, the method in Figure 11 is described in relation to video decoder 300. The method in Figure 11 can generally correspond to step 354 of the method in Figure 8 or to step 378 of the method in Figure 9.
[00173] In this example, video decoder 300 can determine the value of a low-frequency non-separable transform index value (Ifnstldx) for a current block of video data (420). Video decoder 300 can then determine a context table using the Ifnstldx value (422). For example, if the Ifnstldx value is equal to zero, a conventional context table can be used, whereas if the Ifnstldx value is greater than zero, a different context table can be used. It is assumed in this example that the Ifnstldx value has a value greater than zero.
[00174] The video decoder 300 can then determine a context for a current transform coefficient from the context table (424), for example, according to a position of the current transform coefficient in the block. For example, as shown above, the context table (contextTable) and the context index (ctxld) can be selected according to the following pseudocode: contextTable = (lfnst!dx>0) ? contextTableLfnstCoeff: contextTableRegularCoeff ctxld = contextTable[posX][posY][offset(sum(Abs(coeff)))]
[00175] In this pseudocode, if Ifnstldx is greater than zero, a coefficient context table of Petition 870250090148, dated 03 / 10 / 2025, page 86 / 243 79 / 105 LFNST is used, whereas if lfnstIdx is equal to zero, a regular coefficient context table is used. The context index (ctxId - context index) for a transform coefficient at position (posX, posY) in the current block is then selected from the context table determined according to the position of the transform coefficient (and, in this case, the sum of the previous transform coefficient values in scan order, as in Figure 10).
[00176] Finally, the video decoder 300 can then decode the current transform coefficient using the given context (426).
[00177] In this way, the method in Figure 11 represents an example of a video data decoding method including determining a context for context-based encoding of a current transform coefficient of a current block of video data according to previously encoded transform coefficients, the previously encoded transform coefficients being a sequence of transform coefficients immediately preceding the current transform coefficient in scan order; and context-based encoding of the current transform coefficient using the determined context.
[00178] Several examples of the techniques of this disclosure are summarized in the following clauses:
[00179] Clause 1: A method for encoding video data, the method comprising: determining a context for context-based encoding of a current transform coefficient of a current block of video data according to previously encoded transform coefficients, the transform coefficients Petition 870250090148, dated 03 / 10 / 2025, page 87 / 243 80 / 105 previously encoded as a sequence of transform coefficients immediately preceding the current transform coefficient; and context-based encoding of the current transform coefficient using the given context.
[00180] Clause 2: The method of clause 1, wherein context-based encoding of the current transform coefficient comprises context-based decoding of the current transform coefficient, the method further comprising: after context-based decoding of the current transform coefficient, inversely scanning the previously encoded transform coefficients and the current transform coefficient to form a block of transform coefficients; and inversely transforming the block of transform coefficients to the current video data block using one or more Karhunen-Loeve transforms (KLTs) to form a residual block.
[00181] Clause 3: The method of clause 1, wherein context-based encoding of the current transform coefficient comprises context-based encoding of the current transform coefficient, the method further comprising: transforming a residual block to the current block of video data using one or more Karhunen-Loeve transforms (KLTs) to form a transform block to the current block of video data; scanning the transform block to form a one-dimensional vector including the previously encoded transform coefficients and the current transform coefficient.
[00182] Clause 4: The method of any of clauses 1 to 3, which additionally comprises: encoding a Petition 870250090148, dated 03 / 10 / 2025, page 88 / 243 81 / 105 value of the low-frequency non-separable transform index (lfnstIdx) before encoding the previously encoded coefficients and the current coefficient; and use the value of lfnstIdx to determine contexts for context-based encoding values for one or more syntax elements of at least one of the previously encoded coefficients or the current coefficient.
[00183] Clause 5: The method of clause 4, wherein the one or more syntax elements include one or more syntax elements indicating whether the corresponding transform coefficient has an absolute value greater than zero, a syntax element indicating whether the corresponding transform coefficient has an absolute value greater than one, or a syntax element indicating whether the corresponding transform coefficient has an absolute value greater than two.
[00184] Clause 6: The method of any of clauses 4 and 5, wherein one or more syntax elements include syntax elements for determining Rice parameter values used to parse remaining values for one or more of the previously coded coefficients or the current coefficient.
[00185] Clause 7: The method of any of clauses 4 to 6, which additionally comprises encoding the value of lfnstIdx after encoding all values to a last significant coefficient position syntax element of the current block.
[00186] Clause 8: The method of any of clauses 4 to 7, which additionally comprises: determining that the value of lfnstIdx is greater than zero; and in response to Petition 870250090148, dated 03 / 10 / 2025, p. 89 / 243 82 / 105 determination that the value of IfnstIdx is greater than zero: determine contexts for decoding a value of a significant coefficient flag syntax element, indicating whether the current coefficient has an absolute value greater than zero, using values of five of the previously encoded coefficients, the five previously encoded coefficients being encoded in sequential order immediately before the current coefficient; determine contexts for decoding a value of a syntax element indicating whether the current coefficient has an absolute value greater than one using the values of the five previously encoded coefficients; or determine contexts for decoding a value of a syntax element indicating whether the current coefficient has an absolute value greater than two using the values of the five previously encoded coefficients.
[00187] Clause 9: The method of any of clauses 4 to 7, which further comprises: determining that the value of lfnstIdx is greater than zero; determining a size of the current block; determining a number of previously encoded transform coefficients according to the size of the current block; and in response to the determination that the value of lfnstIdx is greater than zero: determining contexts for decoding a value of a significant coefficient flag syntax element, indicating whether the current coefficient has an absolute value greater than zero, using values of the number of previously encoded coefficients, the five of the previously encoded coefficients being encoded in sequential order immediately before the current coefficient; determining Petition 870250090148, dated 03 / 10 / 2025, page 90 / 243 83 / 105 contexts for decoding a syntax element value indicating whether the current coefficient has an absolute value greater than one using the values of the previously encoded coefficient numbers; or determine contexts for decoding a syntax element value indicating whether the current coefficient has an absolute value greater than two using the values of the previously encoded coefficient numbers.
[00188] Clause 10: The method of clause 4, in which one or more syntax elements include syntax elements to determine Rice parameter values used to parse remaining values for one or more of the previously coded coefficients or the current coefficient.
[00189] Clause 11: The method of clause 4, which additionally comprises encoding the value of lfnstIdx after encoding all values to a last significant coefficient position syntax element of the current block.
[00190] Clause 12: The method of clause 4, which further comprises: determining that the value of lfnstIdx is greater than zero; and in response to the determination that the value of lfnstIdx is greater than zero: determining contexts for decoding a value of a significant coefficient flag syntax element, indicating whether the current coefficient has an absolute value greater than zero, using values of five of the previously encoded coefficients, the five previously encoded coefficients being encoded in sequential order immediately before the current coefficient; determining contexts for decoding a value of an element of Petition 870250090148, dated 03 / 10 / 2025, page 91 / 243 84 / 105 syntax indicating whether the current coefficient has an absolute value greater than one using the values of the five previously encoded coefficients; or determining contexts for decoding a value of a syntax element indicating whether the current coefficient has an absolute value greater than two using the values of the five previously encoded coefficients.
[00191] Clause 13: The method of clause 4, which further comprises: determining that the value of lfnstIdx is greater than zero; determining a size of the current block; determining a number of previously encoded transform coefficients according to the size of the current block; and in response to the determination that the value of lfnstIdx is greater than zero: determining contexts for decoding a value of a significant coefficient flag syntax element, indicating whether the current coefficient has an absolute value greater than zero, using values of the number of previously encoded coefficients, the five of the previously encoded coefficients being encoded in sequential order immediately before the current coefficient; determining contexts for decoding a value of a syntax element indicating whether the current coefficient has an absolute value greater than one using the values of the numbers of previously encoded coefficients;or determine contexts for decoding a syntax element value by indicating whether the current coefficient has an absolute value greater than two using the values of the previously encoded coefficient numbers.
[00192] Clause 14: The method of any of clauses 1 to 3, which additionally comprises: coding Petition 870250090148, dated 03 / 10 / 2025, page 92 / 243 85 / 105 of a non-separable primary transform index (nsptIdx) value for the current block after encoding a final significant coefficient syntax element value for the current block; when the nsptIdx value is greater than zero: determine contexts for decoding a significant coefficient flag syntax element value indicating whether the current coefficient has an absolute value greater than zero, using values from a number of previously encoded coefficients, the five previously encoded coefficients being encoded in sequential order immediately before the current coefficient; determine contexts for decoding a syntax element value indicating whether the current coefficient has an absolute value greater than one using the values of the previously encoded coefficient numbers;or determine contexts for decoding a syntax element value by indicating whether the current coefficient has an absolute value greater than two using the values of the previously encoded coefficient numbers.
[00193] Clause 15: The method of clause 14, where the number is equal to 5.
[00194] Clause 16: The method of clause 14, which additionally comprises determining the number according to a current block size.
[00195] Clause 17: The method of clause 16, in which determining the number according to the size of the current block comprises, when the current block has a size of 4x4, determining the number as being equal to 5.
[00196] Clause 18: The method of clause 16, in Petition 870250090148, dated 03 / 10 / 2025, page 93 / 243 86 / 105 which determines the number according to the size of the current block, when the current block has a size of 8x8, determines the number as being equal to 6.
[00197] Clause 19: The method of either of clauses 14 and 15, which additionally comprises determining the number according to a current block size.
[00198] Clause 20: The method of clause 19, in which determining the number according to the size of the current block comprises, when the current block has a size of 4x4, determining the number as being equal to 5.
[00199] Clause 21: The method of clause 19, in which determining the number according to the size of the current block comprises, when the current block has a size of 8x8, determining the number as being equal to 6.
[00200] Clause 22: The method of any of clauses 1 to 21, wherein determining the context comprises: determining a transform type for a transform used to transform the current transform coefficient; determining a context table corresponding to the transform type; and determining the context from the context table.
[00201] Clause 23: The method of clause 22, wherein determining the context table comprises: when a low-frequency nonseparable transform index is equal to zero, determining the context table as a regular coefficient context table; or when the low-frequency nonseparable transform index is greater than zero, determining the context table as a low-frequency nonseparable transform coefficient context table. Petition 870250090148, dated 03 / 10 / 2025, page 94 / 243 87 / 105
[00202] Clause 24: The method of clause 23, wherein determining the context from the context table comprises determining the context according to contextTable[posX][posY][offset(sum(Abs(coeff)))], where contextTable comprises a two-dimensional array, posX represents an X position of the current transform coefficient in the current block, posY represents a Y position of the current transform coefficient in the current block, and offset(sum(Abs(coeff))) represents a sum of the absolute values of the previously encoded transform coefficients shifted according to a displacement zone including the current coefficient.
[00203] Clause 25: The method of any of clauses 22 to 24, in which the current transform coefficient is included in an intraprediction slice (slice I - intraprediction slice).
[00204] Clause 26: The method of any of clauses 1 to 25, which further comprises determining an offset to apply to an aggregate value of the previously coded transform coefficients according to a sweep order position of the current transform coefficient.
[00205] Clause 27: The method of any of clauses 1 to 21, wherein determining the context comprises: determining a value of a low-frequency non-separable transform index; when the value of the low-frequency non-separable transform index is equal to zero, determining a shift according to a position of the current transform coefficient in the current block; when the value of the low-frequency non-separable transform index is equal to Petition 870250090148, dated 03 / 10 / 2025, page 95 / 243 88 / 105 zero, determine the offset according to a sweep order position of the current transform coefficient; and determine the context using the offset.
[00206] Clause 28: A device for decoding video data, the device comprising one or more means for carrying out the method of any of clauses 1 to 27.
[00207] Clause 29: The device of clause 27, in which the one or more means comprise one or more processors implemented in a circuit assembly.
[00208] Clause 30: The device of any of the clauses 27 to 29, which additionally comprises a display configured to show the decoded video data.
[00209] Clause 31: The device of any of clauses 27 to 30, wherein the device comprises one or more of a camera, a computer, a mobile device, a broadcast receiver or a set-top box.
[00210] Clause 32: The device of clauses 27 to 31, which additionally comprises a memory configured to store video data.
[00211] Clause 33: A computer-readable storage medium having instructions stored thereon which, when executed, cause a processor of a video data decoding device to perform the method of any of clauses 1 to 27.
[00212] Clause 34: A device for encoding video data, the device comprising: means for determining a context for context-based encoding of a current transform coefficient of a Petition 870250090148, dated 03 / 10 / 2025, page 96 / 243 89 / 105 current video data block according to previously encoded transform coefficients, the previously encoded transform coefficients being a sequence of transform coefficients immediately preceding the current transform coefficient; and means for context-based encoding of the current transform coefficient using the determined context.
[00213] Clause 35: A method for encoding video data, the method comprising: determining a context for context-based encoding of a current transform coefficient of a current block of video data according to previously encoded transform coefficients, the previously encoded transform coefficients being a sequence of transform coefficients immediately preceding the current transform coefficient in scan order; and context-based encoding of the current transform coefficient using the determined context.
[00214] Clause 36: The method of clause 35, wherein context-based encoding of the current transform coefficient comprises context-based decoding of the current transform coefficient, the method further comprising: inversely scanning the previously encoded transform coefficients and the current transform coefficient according to the scanning order to form a block of transform coefficients; and inversely transforming the block of transform coefficients to the current video data block using one or more Karhunen-Loeve transforms (KLTs) to form a residual block. Petition 870250090148, dated 03 / 10 / 2025, page 97 / 243 90 / 105
[00215] Clause 37: The method of clause 35, wherein context-based encoding of the current transform coefficient comprises context-based encoding of the current transform coefficient, the method further comprising: transforming a residual block to the current video data block using one or more Karhunen-Loeve transforms (KLTs) to form a transform block to the current video data block; scanning the transform block according to the scan order to form a one-dimensional vector including the previously encoded transform coefficients and the current transform coefficient.
[00216] Clause 38: The method of clause 35, which further comprises: encoding a low-frequency non-separable transform index value (lfnstIdx) before encoding the previously encoded coefficients and the current coefficient; and using the value of lfnstIdx to determine contexts for context-based encoding values for one or more syntax elements of at least one of the previously encoded coefficients or the current coefficient.
[00217] Clause 39: The method of clause 38, wherein the one or more syntax elements include one or more syntax elements indicating whether the corresponding transform coefficient has an absolute value greater than zero, a syntax element indicating whether the corresponding transform coefficient has an absolute value greater than one, or a syntax element indicating whether the corresponding transform coefficient has an absolute value greater than two. Petition 870250090148, dated 03 / 10 / 2025, page 98 / 243 91 / 105
[00218] Clause 40: The method of clause 38, in which one or more syntax elements include syntax elements to determine Rice parameter values used to parse remaining values for one or more of the previously coded coefficients or the current coefficient.
[00219] Clause 41: The method of clause 38, which additionally comprises encoding the value of lfnstIdx after encoding all values to a last significant coefficient position syntax element of the current block.
[00220] Clause 42: The method of clause 38, which further comprises: determining that the value of lfnstIdx is greater than zero; and in response to the determination that the value of lfnstIdx is greater than zero: determining contexts for decoding a value of a significant coefficient flag syntax element, indicating whether the current coefficient has an absolute value greater than zero, using values of five of the previously encoded coefficients, the five previously encoded coefficients being encoded in sequential order immediately before the current coefficient; determining contexts for decoding a value of a syntax element indicating whether the current coefficient has an absolute value greater than one using the values of the five previously encoded coefficients;or determine contexts for decoding a syntax element value by indicating whether the current coefficient has an absolute value greater than two using the values of the five previously encoded coefficients.
[00221] Clause 43: The method of clause 38, Petition 870250090148, dated 03 / 10 / 2025, page 99 / 243 92 / 105 which further comprises: determining that the value of lfnstIdx is greater than zero; determining a current block size; determining a number of previously encoded transform coefficients according to the current block size; and in response to the determination that the value of lfnstIdx is greater than zero: determining contexts for decoding a value of a significant coefficient flag syntax element, indicating whether the current coefficient has an absolute value greater than zero, using values of the number of previously encoded coefficients, the five of the previously encoded coefficients being encoded in sequential order immediately before the current coefficient; determining contexts for decoding a value of a syntax element indicating whether the current coefficient has an absolute value greater than one using the values of the numbers of previously encoded coefficients;or determine contexts for decoding a syntax element value by indicating whether the current coefficient has an absolute value greater than two using the values of the previously encoded coefficient numbers.
[00222] Clause 44: The method of clause 35, which further comprises: encoding a non-separable primary transform index value (nsptIdx) for the current block after encoding a final significant coefficient syntax element value for the current block; when the nsptIdx value is greater than zero: determining contexts for decoding a significant coefficient flag syntax element value, indicating whether the current coefficient has an absolute value greater than zero, using values from a number of the encoded coefficients Petition 870250090148, dated 03 / 10 / 2025, pp. 100 / 243 93 / 105 previously, the five previously encoded coefficients being encoded in sequential order immediately before the current coefficient; determine contexts for decoding a syntax element value indicating whether the current coefficient has an absolute value greater than one using the numerical values of the previously encoded coefficients; or determine contexts for decoding a syntax element value indicating whether the current coefficient has an absolute value greater than two using the numerical values of the previously encoded coefficients.
[00223] Clause 45: The method of clause 35, wherein determining the context comprises: determining a transform type for a transform used to transform the current transform coefficient; determining a context table corresponding to the transform type; and determining the context from the context table.
[00224] Clause 46: The method of clause 45, wherein determining the context table comprises: when a low-frequency non-separable transform index is equal to zero, determining the context table as a regular coefficient context table; or when the low-frequency non-separable transform index is greater than zero, determining the context table as a low-frequency non-separable transform coefficient context table.
[00225] Clause 47: The method of clause 46, in which determining the context from the context table comprises determining the context according to contextTable[posX][posY][offset(sum(Abs(coeff)))], where Petition 870250090148, dated 03 / 10 / 2025, pp. 101 / 243 94 / 105 contextTable comprises a two-dimensional array, posX represents an X position of the current transform coefficient in the current block, posY represents a Y position of the current transform coefficient in the current block, and offset(sum(Abs(coeff))) represents a sum of the absolute values of the previously encoded transform coefficients shifted according to a displacement zone including the current coefficient.
[00226] Clause 48: The method of clause 45, in which the current transform coefficient is included in an intraprediction slice (slice I).
[00227] Clause 49: The method of clause 35, which further comprises determining an offset to apply to an aggregate value of the previously coded transform coefficients according to a sweep order position of the current transform coefficient.
[00228] Clause 50: The method of clause 35, wherein determining the context comprises: determining a value of a low-frequency non-separable transform index; when the value of the low-frequency non-separable transform index is equal to zero, determining an offset according to a position of the current transform coefficient in the current block; when the value of the low-frequency non-separable transform index is equal to zero, determining the offset according to a sweep order position of the current transform coefficient; and determining the context using the offset.
[00229] Clause 51: A device for decoding video data, the device Petition 870250090148, dated 03 / 10 / 2025, pp. 102 / 243 95 / 105 comprising: a memory configured to store video data; and a processing system comprising one or more processors implemented in a circuit array, the processing system being configured to: determine a context for context-based encoding of a current transform coefficient of a current block of video data according to previously encoded transform coefficients, the previously encoded transform coefficients being a sequence of transform coefficients immediately preceding the current transform coefficient in scan order; and context-based encoding of the current transform coefficient using the determined context.
[00230] Clause 52: The device of clause 51, which additionally comprises a display configured to show the decoded video data.
[00231] Clause 53: The device of clause 51, wherein the device comprises one or more of a camera, a computer, a mobile device, a broadcast receiver or a set-top box.
[00232] Clause 54: A device for encoding video data, the device comprising: means for determining a context for context-based encoding of a current transform coefficient of a current block of video data according to previously encoded transform coefficients, the previously encoded transform coefficients being a sequence of transform coefficients immediately preceding the current transform coefficient in scan order; and means for context-based encoding of the coefficient Petition 870250090148, dated 03 / 10 / 2025, page 103 / 243 96 / 105 of the current transform using the given context.
[00233] Clause 55: A method for encoding video data, the method comprising: determining a context for context-based encoding of a current transform coefficient of a current block of video data according to previously encoded transform coefficients, the previously encoded transform coefficients being a sequence of transform coefficients immediately preceding the current transform coefficient in scan order; and context-based encoding of the current transform coefficient using the determined context.
[00234] Clause 56: The method of clause 55, wherein context-based encoding of the current transform coefficient comprises context-based decoding of the current transform coefficient, the method further comprising: inversely scanning the previously encoded transform coefficients and the current transform coefficient according to the scanning order to form a block of transform coefficients; and inversely transforming the block of transform coefficients to the current video data block using one or more Karhunen-Loeve transforms (KLTs) to form a residual block.
[00235] Clause 57: The method of clause 55, wherein context-based encoding of the current transform coefficient comprises context-based encoding of the current transform coefficient, the method further comprising: transforming a residual block into the current block of video data using one or more Petition 870250090148, dated 03 / 10 / 2025, page 104 / 243 97 / 105 Karhunen-Loeve transforms (KLTs) are used to form a transform block for the current video data block; the transform block is scanned according to the scan order to form a one-dimensional vector including the previously encoded transform coefficients and the current transform coefficient.
[00236] Clause 58: The method of any of clauses 55 to 57, which further comprises: encoding a low-frequency non-separable transform index value (lfnstIdx) before encoding the previously encoded coefficients and the current coefficient; and using the value of lfnstIdx to determine contexts for context-based encoding values for one or more syntax elements of at least one of the previously encoded coefficients or the current coefficient.
[00237] Clause 59: The method of clause 38, wherein the one or more syntax elements include one or more syntax elements indicating whether the corresponding transform coefficient has an absolute value greater than zero, a syntax element indicating whether the corresponding transform coefficient has an absolute value greater than one, or a syntax element indicating whether the corresponding transform coefficient has an absolute value greater than two.
[00238] Clause 60: The method of any of clauses 58 and 59, wherein one or more syntax elements include syntax elements for determining Rice parameter values used to parse remaining values for one or more of the previously coded coefficients or the current coefficient. Petition 870250090148, dated 03 / 10 / 2025, page 105 / 243 98 / 105
[00239] Clause 61: The method of any of clauses 58 to 60, which additionally comprises encoding the value of lfnstIdx after encoding all values to a last significant coefficient position syntax element of the current block.
[00240] Clause 62: The method of any of clauses 58 to 61, which further comprises: determining that the value of lfnstIdx is greater than zero; and in response to the determination that the value of lfnstIdx is greater than zero: determining contexts for decoding a value of a significant coefficient flag syntax element, indicating whether the current coefficient has an absolute value greater than zero, using values of five of the previously encoded coefficients, the five previously encoded coefficients being encoded in sequential order immediately before the current coefficient; determining contexts for decoding a value of a syntax element indicating whether the current coefficient has an absolute value greater than one using the values of five of the previously encoded coefficients;or determine contexts for decoding a syntax element value by indicating whether the current coefficient has an absolute value greater than two using the values of the five previously encoded coefficients.
[00241] Clause 63: The method of any of clauses 58 to 61, which further comprises: determining that the value of lfnstIdx is greater than zero; determining a current block size; determining a number of transform coefficients previously coded according to the current block size; and in response to the determination that Petition 870250090148, dated 03 / 10 / 2025, pp. 106 / 243 99 / 105 the value of IfnstIdx is greater than zero: determine contexts for decoding a value of a significant coefficient flag syntax element, indicating whether the current coefficient has an absolute value greater than zero, using values of the number of previously encoded coefficients, the five previously encoded coefficients being encoded in sequential order immediately before the current coefficient; determine contexts for decoding a value of a syntax element indicating whether the current coefficient has an absolute value greater than one using the values of the numbers of previously encoded coefficients; or determine contexts for decoding a value of a syntax element indicating whether the current coefficient has an absolute value greater than two using the values of the numbers of previously encoded coefficients.
[00242] Clause 64: The method of any of clauses 55 to 61, which further comprises: encoding a non-separable primary transform index value (nsptIdx) for the current block after encoding a final significant coefficient syntax element value for the current block; when the nsptIdx value is greater than zero: determining contexts for decoding a significant coefficient flag syntax element value, indicating whether the current coefficient has an absolute value greater than zero, using values from a number of the previously encoded coefficients, the five previously encoded coefficients being encoded in sequential order immediately before the current coefficient; determining contexts for decoding a value of a Petition 870250090148, dated 03 / 10 / 2025, page 107 / 243 100 / 105 syntax element indicating whether the current coefficient has an absolute value greater than one using the values of the previously encoded coefficient numbers; or determine contexts for decoding a value of a syntax element indicating whether the current coefficient has an absolute value greater than two using the values of the previously encoded coefficient numbers.
[00243] Clause 65: The method of any of clauses 55 to 64, wherein determining the context comprises: determining a transform type for a transform used to transform the current transform coefficient; determining a context table corresponding to the transform type; and determining the context from the context table.
[00244] Clause 66: The method of clause 65, wherein determining the context table comprises: when a low-frequency non-separable transform index is equal to zero, determining the context table as a regular coefficient context table; or when the low-frequency non-separable transform index is greater than zero, determining the context table as a low-frequency non-separable transform coefficient context table.
[00245] Clause 67: The method of clause 66, wherein determining the context from the context table comprises determining the context according to contextTable[posX][posY][offset(sum(Abs(coeff)))], where contextTable comprises a two-dimensional array, posX represents an X position of the current transform coefficient in the current block, posY represents a Y position of the coefficient Petition 870250090148, dated 03 / 10 / 2025, pp. 108 / 243 101 / 105 of the current transform in the current block and offset(sum(Abs(coeff))) represents a sum of the absolute values of the previously encoded transform coefficients shifted according to a displacement zone including the current coefficient.
[00246] Clause 68: The method of any of clauses 65 to 67, in which the current transform coefficient is included in an intraprediction slice (slice I).
[00247] Clause 69: The method of any of clauses 55 to 68, which further comprises determining an offset to apply to an aggregate value of the previously coded transform coefficients according to a sweep order position of the current transform coefficient.
[00248] Clause 70: The method of any of clauses 55 to 69, wherein determining the context comprises: determining a value of a low-frequency non-separable transform index; when the value of the low-frequency non-separable transform index is equal to zero, determining an offset according to a position of the current transform coefficient in the current block; when the value of the low-frequency non-separable transform index is equal to zero, determining the offset according to a sweep order position of the current transform coefficient; and determining the context using the offset.
[00249] It should be recognized that, depending on the example, certain actions or events of any of the techniques described in the present invention may be performed in a different sequence, may be added, combined or completely omitted (for example, not all Petition 870250090148, dated 03 / 10 / 2025, page 109 / 243 102 / 105 (the actions or events described are necessary for the practice of the techniques). Furthermore, in certain examples, the actions or events may be performed simultaneously, for example, through multi-threaded processing, interrupt processing, or multiple processors, rather than sequentially.
[00250] In one or more examples, the functions described may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored or transmitted as one or more instructions or code in a computer-readable medium and executed by a hardware-based processing unit. Computer-readable media may include computer-readable storage media, which correspond to a tangible medium, such as data storage media, or communication media, including any medium that facilitates the transfer of a computer program from one place to another, for example, according to a communication protocol. In this way, computer-readable media may generally correspond to (1) tangible computer-readable storage media that are non-transient or (2) a communication medium, such as a signal or a carrier wave.The data storage medium can be any available medium that can be accessed by one or more computers or one or more processors to retrieve instructions, code, and / or data structures for implementing the techniques described in this disclosure. A computer program product may include a computer-readable medium.
[00251] By way of example, and not limitation, Petition 870250090148, dated 03 / 10 / 2025, pp. 110 / 243 103 / 105 Such computer-readable storage media may comprise random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, flash memory or any other media that can be used to store the desired program code in the form of instructions or data structures and that can be accessed by a computer. In addition, any connection is properly termed a computer-readable medium.For example, if instructions are transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave will be included in the definition of medium. It should be understood, however, that computer-readable storage media and data storage media do not include connections, carrier waves, signals, or other transient media, but instead refer to tangible non-transient storage media. As used in the present invention, disks (disk and disc) include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk, and Blu-ray disc, where disks typically... Petition 870250090148, dated 03 / 10 / 2025, page 111 / 243 104 / 105 reproduce data magnetically, while discs reproduce data optically using lasers. Combinations of the above should also be included within the scope of computer-readable media.
[00252] The instructions may be executed by one or more processors, such as one or more digital signal processors (DSPs), general-purpose microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other distinct or equivalent integrated logic circuit assemblies. Consequently, the terms processor and processing circuit assembly, as used in the present invention, may refer to any of the foregoing structures or any other structure suitable for implementing the techniques described in the present invention. Furthermore, in some respects, the functionality described in the present invention may be provided in dedicated hardware and / or software modules configured for encoding and decoding, or may be incorporated into a combined codec. Additionally, the techniques may be fully implemented in one or more logic circuits or elements.
[00253] The techniques in this disclosure can be implemented in a wide variety of devices or appliances, including a wireless handset, an integrated circuit (IC), or a set of ICs (e.g., a chipset). Several components, modules, or units are described in this disclosure to emphasize functional aspects of devices configured to perform the disclosed techniques, but do not necessarily require implementation by different hardware units. In Petition 870250090148, dated 03 / 10 / 2025, pp. 112 / 243 Instead, as described above, multiple units can be combined into a single codec hardware unit or provided by a collection of interoperable hardware units, including one or more processors, as described above, in conjunction with appropriate software and / or firmware.
[00254] Several examples have been described. These and other examples are within the scope of the following claims. Petition 870250090148, dated 03 / 10 / 2025, pp. 113 / 243
Claims
1 / 8 CLAIMS 1. A method for encoding video data characterized by comprising: determining a context for context-based encoding of a current transform coefficient of a current block of video data according to previously encoded transform coefficients, the previously encoded transform coefficients being a sequence of transform coefficients immediately preceding the current transform coefficient in scan order; and context-based encoding of the current transform coefficient using the determined context.
2. A method according to claim 1, characterized in that context-based encoding of the current transform coefficient comprises context-based decoding of the current transform coefficient, the method further comprising: inversely scanning the previously encoded transform coefficients and the current transform coefficient according to the scanning order to form a block of transform coefficients; and inversely transforming the block of transform coefficients to the current block of video data using one or more Karhunen-Loeve transforms (KLTs) to form a residual block.
3. Method according to claim 1, characterized in that context-based encoding of the current transform coefficient comprises context-based encoding of the current transform coefficient, the method further comprising: Petition 870250090148, 03 / 10 / 2025, p. 220 / 243 2 / 8 transforming a residual block to the current block of video data using one or more Karhunen-Loeve transforms (KLTs) to form a transform block to the current block of video data; scanning the transform block according to the scan order to form a one-dimensional vector including the previously encoded transform coefficients and the current transform coefficient.
4. A method according to claim 1, characterized by further comprising: encoding a low-frequency non-separable transform index value (lfnstIdx) prior to encoding the previously encoded coefficients and the current coefficient; and using the lfnstIdx value to determine contexts for context-based encoding values for one or more syntax elements of at least one of the previously encoded coefficients or the current coefficient.
5. Method, according to claim 4, characterized in that the one or more syntax elements include one or more syntax elements indicating whether the corresponding transform coefficient has an absolute value greater than zero, a syntax element indicating whether the corresponding transform coefficient has an absolute value greater than one, or a syntax element indicating whether the corresponding transform coefficient has an absolute value greater than two.
6. Method, according to claim 4, characterized by one or more syntax elements including syntax elements to determine Rice parameter values used to analyze remaining values for one or more of the previously coded coefficients or the current coefficient.
7. Method, according to claim 4, characterized by further comprising encoding the value of lfnstIdx after encoding all values to a final significant coefficient position syntax element of the current block.
8. A method according to claim 4, characterized by further comprising: determining that the value of lfnstIdx is greater than zero; and in response to the determination that the value of lfnstIdx is greater than zero: determining contexts for decoding a value of a significant coefficient flag syntax element, indicating whether the current coefficient has an absolute value greater than zero, using values of five of the previously encoded coefficients, the five previously encoded coefficients being encoded in sequential order immediately before the current coefficient; determining contexts for decoding a value of a syntax element indicating whether the current coefficient has an absolute value greater than one using the values of the five previously encoded coefficients;or determine contexts for decoding a syntax element value by indicating whether the current coefficient has an absolute value greater than two using the values of the five previously encoded coefficients.
9. Method according to claim 4, Petition 870250090148, dated 10 / 03 / 2025, pp. 222 / 243 4 / 8 characterized by further comprising: determining that the value of Ifnstldx is greater than zero; determining a current block size; determining a number of previously encoded transform coefficients according to the current block size; and in response to the determination that the value of lfnstIdx is greater than zero: determining contexts for decoding a value of a significant coefficient flag syntax element, indicating whether the current coefficient has an absolute value greater than zero, using values of the number of previously encoded coefficients, the five of the previously encoded coefficients being encoded in sequential order immediately before the current coefficient;To determine contexts for decoding a syntax element value, indicating whether the current coefficient has an absolute value greater than one using the values of the previously encoded coefficient numbers; or to determine contexts for decoding a syntax element value, indicating whether the current coefficient has an absolute value greater than two using the values of the previously encoded coefficient numbers.
10. Method according to claim 1, characterized by further comprising: encoding a non-separable primary transform index value (nsptIdx) for the current block after encoding a final significant coefficient syntax element value for the current block; when the nsptIdx value is greater than zero: Petition 870250090148, dated 10 / 03 / 2025, p.223 / 243 5 / 8 determine contexts for decoding a value of a significant coefficient flag syntax element, indicating whether the current coefficient has an absolute value greater than zero, using values from a number of previously encoded coefficients, the five previously encoded coefficients being encoded in sequential order immediately before the current coefficient; determine contexts for decoding a value of a syntax element indicating whether the current coefficient has an absolute value greater than one using the values of the numbers of previously encoded coefficients; or determine contexts for decoding a value of a syntax element indicating whether the current coefficient has an absolute value greater than two using the values of the numbers of previously encoded coefficients.
11. Method, according to claim 1, characterized by determining the context comprising: determining a transform type for a transform used to transform the current transform coefficient; determining a context table corresponding to the transform type; and determining the context from the context table.
12. Method according to claim 11, characterized by determining the context table comprising: when a low-frequency non-separable transform index is equal to zero, determining the context table as being a regular coefficient context table; or Petition 870250090148, dated 10 / 03 / 2025, pp. 224 / 243 6 / 8 when the low-frequency non-separable transform index is greater than zero, determining the context table as being a low-frequency non-separable transform coefficient context table.
13. Method, according to claim 12, characterized by determining the context from the context table comprising determining the context according to contextTable[posX][posY][offset(sum(Abs(coeff)))], where contextTable comprises a two-dimensional array, posX represents a position X of the current transform coefficient in the current block, posY represents a position Y of the current transform coefficient in the current block, and offset(sum(Abs(coeff))) represents a sum of the absolute values of the previously encoded transform coefficients shifted according to a displacement zone including the current coefficient.
14. Method according to claim 11, characterized in that the current transform coefficient is included in an intraprediction slice (slice I).
15. Method, according to claim 1, characterized by further comprising determining an offset to apply to an aggregate value of the previously coded transform coefficients according to a sweep order position of the current transform coefficient.
16. Method, according to claim 1, characterized by determining the context comprising: determining a value of a low-frequency non-separable transform index; when the value of the low-frequency non-separable transform index is equal to zero, determining a shift according to a position of the current transform coefficient in the current block; when the value of the low-frequency non-separable transform index is equal to zero, determining the shift according to a sweep order position of the current transform coefficient; and determining the context using the shift.
17. Device for decoding video data characterized by comprising: a memory configured to store video data; and a processing system comprising one or more processors implemented in a circuit array, wherein the processing system is configured to: determine a context for context-based encoding of a current transform coefficient of a current block of video data according to previously encoded transform coefficients, the previously encoded transform coefficients being a sequence of transform coefficients immediately preceding the current transform coefficient in scan order; and context-based encoding of the current transform coefficient using the determined context.
18. Device according to claim 17, characterized by further comprising a display configured to display the decoded video data.
19. Device according to claim 17, characterized by comprising one or more of a camera, a computer, a mobile device, a broadcast receiving device or a set-top box.
20. Device for encoding video data characterized by comprising: means for determining a context for context-based encoding of a current transform coefficient of a current block of video data according to previously encoded transform coefficients, the previously encoded transform coefficients being a sequence of transform coefficients immediately preceding the current transform coefficient in scan order; and means for context-based encoding of the current transform coefficient using the determined context. Petition 870250090148, dated 10 / 03 / 2025, pp. 227 / 243