Context derivation for last position decoding in video coding

By using a function of transform block size in video encoding technology to determine the context of syntax elements, the problem of reduced coding efficiency and increased distortion caused by the use of the same context among different transform block sizes in the prior art is solved, and more efficient video decoding and lower distortion are achieved.

CN113647107BActive Publication Date: 2025-07-01QUALCOMM INC
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202080024948.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2020-03-31
Filing Date
2020-04-01
Publication Date
2025-07-01
Estimated Expiration
2040-04-01

AI Technical Summary

Technical Problem

In existing video encoding techniques, the use of the same context between different transform block sizes may lead to reduced decoding efficiency and increased distortion.

Method used

Determine the context of the syntax element by using a function of transform block size so that the same context is not used for transform blocks of different sizes, thereby using different contexts between different transform block sizes.

Benefits of technology

Improves the efficiency of video decoding, reduces distortion, and ensures context consistency between different transform block sizes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113647107B_ABST
    Figure CN113647107B_ABST
Patent Text Reader

Abstract

A video decoder can determine a context for entropy coding a binary number of a last significant coefficient position syntax element. For example, the video decoder can use a function of the size of a transform block to determine a respective context for each binary number of one or more binary numbers of a syntax element indicating a position of a last significant coefficient in the transform block, where the function outputs the respective context such that the same context is not used for transform blocks of different sizes.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application claims the benefit of priority of U.S. Patent Application No. 16 / 836,033, filed Mar. 31, 2020, which claims the benefit of U.S. Provisional Application No. 62 / 828,266, filed Apr. 2, 2019, the entire contents of each of the above applications being incorporated herein by reference. Technical Field

[0002] The present disclosure relates to video encoding and video decoding. Background Art

[0003] Digital video capabilities can be incorporated into a variety of devices, including digital televisions, digital live systems, wireless broadcast systems, personal digital assistants (PDAs), laptop or desktop computers, tablet computers, e-book readers, digital cameras, digital recording devices, digital media players, video game devices, video game consoles, cellular or satellite radiotelephones (so-called “smart phones”), video teleconferencing devices, video streaming devices, etc. Digital video devices implement video decoding technologies (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)) and extensions of such standards). By implementing such video decoding technologies, video devices can more efficiently transmit, receive, encode, decode, and / or store digital video information.

[0004] Video decoding technologies include spatial (intra-picture) prediction and / or temporal (inter-picture) prediction to reduce or remove redundancy inherent in a video sequence. For block-based video decoding, a video slice (e.g., a video picture or a portion of a video picture) can be divided into video blocks, which can also be referred to as coding tree units (CTUs), coding units (CUs), and / or coding nodes. Video blocks in an intra-coded (I) slice of a picture are encoded using spatial prediction relative to reference samples in adjacent blocks in the same picture. Video blocks in an inter-coded (P or B) slice of a picture can be encoded using spatial prediction relative to reference samples in adjacent blocks in the same picture or temporal prediction relative to reference samples in other reference pictures. A picture can be referred to as a frame, and a reference picture can be referred to as a reference frame. Summary of the Invention

[0005] In general, the present disclosure describes techniques for entropy coding in video coding. Specifically, the present disclosure describes apparatuses and methods for context-adaptive entropy coding of one or more syntax elements that indicate the last significant coefficient position (e.g., the last position). Some example techniques for determining the context of a syntax element that indicates the last significant coefficient may result in the same context being used for different binary numbers between different transform block sizes. Using the same context for different binary numbers between different transform block sizes may result in lower coding efficiency and / or an unnecessary increase in distortion.

[0006] The present disclosure describes techniques for using a function of the size of a transform block to determine a respective context for each binary number in one or more binary numbers of a syntax element that indicates the position of the last significant coefficient in the transform block, where the function outputs the respective context such that the same context is not used for transform blocks of different sizes. In fact, with this function, for transform blocks of different sizes, the context of each respective binary number of the syntax element that indicates the last significant coefficient position is different. In this way, the same context is not used between different transform block sizes, and thus, coding efficiency can be improved and / or the resulting decoded video data can exhibit less distortion.

[0007] In one example, the present disclosure describes a method for decoding video data, the method comprising: receiving entropy-coded data for a current block of video data, where the entropy-coded data includes entropy-coded data for a syntax element that indicates the position of the last significant coefficient in a transform block of the current block; using a function of the size of the transform block to determine a respective context for each binary number in the entropy-coded data for the syntax element that indicates the position of the last significant coefficient, where the function outputs the respective context such that the same context is not used for transform blocks of different sizes; and using the determined respective context to decode the entropy-coded data for the syntax element that indicates the position of the last significant coefficient.

[0008] In another example, the present disclosure describes an apparatus configured to decode video data, the apparatus including a memory configured to store a current block of the video data and one or more processors in communication with the memory, the one or more processors being configured to: receive entropy-coded data for the current block of the video data, wherein the entropy-coded data includes entropy-coded data for a syntax element indicating a position of a last significant coefficient in a transform block of the current block; determine, using a function of a size of the transform block, a respective context for each of one or more binary numbers of the entropy-coded data for the syntax element indicating the position of the last significant coefficient, wherein the function outputs the respective context such that the same context is not used for transform blocks having different sizes; and decode the entropy-coded data for the syntax element indicating the position of the last significant coefficient using the determined respective context.

[0009] In another example, the present disclosure describes an apparatus configured to decode video data, the apparatus including: a unit configured to receive entropy-coded data for a current block of the video data, wherein the entropy-coded data includes entropy-coded data for a syntax element indicating a position of a last significant coefficient in a transform block of the current block; a unit configured to determine, using a function of a size of the transform block, a respective context for each of one or more binary numbers of the entropy-coded data for the syntax element indicating the position of the last significant coefficient, wherein the function outputs the respective context such that the same context is not used for transform blocks having different sizes; and a unit configured to decode the entropy-coded data for the syntax element indicating the position of the last significant coefficient using the determined respective context.

[0010] In another example, the present disclosure describes a non-transitory computer-readable storage medium storing instructions that, when executed, cause one or more processors of a device configured to decode video data to perform the following operations: receive entropy-coded data for a current block of video data, wherein the entropy-coded data includes entropy-coded data for a syntax element indicating a position of a last significant coefficient in a transform block of the current block; use a function of the size of the transform block to determine a respective context for each binary number of one or more binary numbers of the entropy-coded data for the syntax element indicating the position of the last significant coefficient, wherein the function outputs the respective context such that the same context is not used for transform blocks of different sizes; and decode the entropy-coded data for the syntax element indicating the position of the last significant coefficient using the determined respective context.

[0011] Details of one or more examples are set forth in the accompanying drawings and the following description. Other features, objects, and advantages will be apparent from the description, drawings, and claims. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 is a block diagram illustrating an example video encoding and decoding system that may execute the techniques of the present disclosure.

[0013] Figure 2 is a block diagram illustrating an example video encoder that may execute the techniques of the present disclosure.

[0014] Figure 3 is a block diagram illustrating an example video decoder that may execute the techniques of the present disclosure.

[0015] Figure 4 is a flowchart illustrating an example encoding method according to an example of the present disclosure.

[0016] Figure 5 is a flowchart illustrating an example entropy encoding method according to an example of the present disclosure.

[0017] Figure 6 is a flowchart illustrating an example decoding method according to an example of the present disclosure.

[0018] Figure 7 is a flowchart illustrating an example entropy decoding method according to an example of the present disclosure. DETAILED DESCRIPTION

[0019] In general, the present disclosure describes techniques for deriving contexts (e.g., probability models) used in entropy encoding and entropy decoding (e.g., using context-adaptive binary arithmetic coding) of binary numbers (bins) for syntax elements. Specifically, the present disclosure describes techniques for determining a context for a binary number of a syntax element that indicates an X or Y position of a last significant coefficient in a transform block. Some example techniques for determining a context for a syntax element that indicates a last significant coefficient may result in the same context being used for different binary numbers between different transform block sizes. Using the same context for different binary numbers between different transform block sizes may result in lower decoding efficiency and / or an unnecessary increase in distortion.

[0020] The present disclosure describes techniques for determining a respective context for each binary number of one or more binary numbers for a syntax element that indicates a position of a last significant coefficient in a transform block using a function of the size of the transform block, where the function outputs the respective context such that the same context is not used for transform blocks of different sizes. In this way, the same context is not used between different transform block sizes, and thus, decoding efficiency can be improved and / or the resulting decoded video data can exhibit less distortion.

[0021] Figure 1 FIG. 1 is a block diagram of an example video encoding and decoding system 100 that can perform the last significant coefficient position decoding techniques of the present disclosure. In general, the techniques of the present disclosure relate to decoding (encoding and / or decoding) video data. Typically, video data includes any data for processing video. Thus, video data can include raw unencoded video, encoded video, decoded (e.g., reconstructed) video, and video metadata (such as signaling data).

[0022] As Figure 1 shown, in this example, system 100 includes a source device 102 that provides encoded video data to be decoded and displayed by a destination device 116. Specifically, source device 102 provides the video data to destination device 116 via a computer-readable medium 110. Source device 102 and destination device 116 can include any of a variety of devices, including desktop computers, laptop computers (i.e., notebook computers), tablet computers, set-top boxes, cellular phones such as smart phones, televisions, cameras, display devices, digital media players, video game consoles, video streaming devices, etc. In some cases, source device 102 and destination device 116 can be equipped for wireless communication and can thus be referred to as wireless communication devices.

[0023] In Figure 1In the example, 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 the present disclosure, video encoder 200 of source device 102 and video decoder 300 of destination device 116 can be configured to apply techniques for last significant coefficient position decoding. Thus, source device 102 represents an example of a video encoding device, and destination device 116 represents an example of a video decoding device. In other examples, source and destination devices may include other components or arrangements. For example, source device 102 may receive video data from an external video source such as an external camera. Similarly, destination device 116 may interface with an external display device instead of including an integrated display device.

[0024] As Figure 1 shown, system 100 is merely an example. Generally, any digital video encoding and / or decoding device may perform techniques for last significant coefficient position decoding. Source device 102 and destination device 116 are merely examples of such decoding devices, where source device 102 generates encoded video data for transmission to destination device 116. The present disclosure refers to a "decoding" device as a device that performs decoding (e.g., encoding and / or decoding) of data. Thus, video encoder 200 and video decoder 300 represent examples of decoding devices (specifically, a video encoder and a video decoder), respectively. In some examples, devices 102, 116 may operate in a substantially symmetric manner such that each of devices 102, 116 includes video encoding and decoding components. Thus, system 100 may support unidirectional or bidirectional video transmission between video devices 102, 116, e.g., for video streaming, video playback, video broadcast, or video telephony.

[0025] Typically, video source 104 represents the source of video data (i.e., the original, unencoded video data), and provides a sequential series of pictures (also referred to as "frames") of the video data to video encoder 200, which encodes the data for the pictures. The video source 104 of source device 102 may include a video capture device, such as a camera, a video archive unit 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 as the source video, or generate a combination of live video, archived video, and computer-generated video. In each case, the video encoder 200 may encode the captured, pre-captured, or computer-generated video data. The video encoder 200 may reorder the pictures from the received order (sometimes referred to as "display order") into a decoding order for decoding. The video encoder 200 may generate a bitstream including the encoded video data. Then, the source device 102 may output the encoded video data to a computer-readable medium 110 via output interface 108 for reception and / or retrieval by, for example, an input interface 122 of destination device 116.

[0026] The memories 106 of source device 102 and 120 of destination device 116 represent general memories. In some examples, the memories 106, 120 may store raw video data, e.g., the raw video from video source 104 and the original decoded video data from video decoder 300. Additionally or alternatively, the memories 106, 120 may store software instructions executable by, for example, video encoder 200 and video decoder 300, respectively. Although the memories 106, 120 are shown as separate from the video encoder 200 and video decoder 300 in this example, it should be understood that the video encoder 200 and video decoder 300 may also include internal memories for functionally similar or equivalent purposes. Further, the memories 106, 120 may store, for example, the encoded video data output from video encoder 200 and input to video decoder 300. In some examples, portions of the memories 106, 120 may be allocated as one or more video buffers, e.g., to store the original decoded and / or encoded video data.

[0027] Computer-readable medium 110 can represent any type of medium or device capable of conveying the encoded video data from source device 102 to destination device 116. In one example, computer-readable medium 110 represents a communication medium that enables source device 102 to directly send the encoded video data to destination device 116 in real time, for example, via a radio-frequency network or a computer-based network. Output interface 108 can modulate the transmission signal including the encoded video data according to a communication standard such as a wireless communication protocol, and input interface 122 can demodulate the received transmission signal according to a communication standard such as a wireless communication protocol. The communication medium can include any wireless or wired communication medium, for example, the radio-frequency (RF) spectrum or one or more physical transmission lines. The communication medium can form 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 can include routers, switches, base stations, or any other devices that may be useful for facilitating communication from source device 102 to destination device 116.

[0028] In some examples, computer-readable medium 110 can include storage device 112. Source device 102 can output the encoded data from output interface 108 to storage device 112. Similarly, destination device 116 can access the encoded data from storage device 112 via input interface 122. Storage device 112 can include any of a variety of distributed or locally accessible data storage media, such as a hard disk drive, a Blu-ray disc, a DVD, a CD-ROM, flash memory, volatile or non-volatile memory, or any other suitable digital storage media for storing the encoded video data.

[0029] In some examples, the computer-readable medium 110 can include a file server 114 or another intermediate storage device that can store the encoded video data generated by the source device 102. The source device 102 can output the encoded video data to the file server 114 or another intermediate storage device that can store the encoded video generated by the source device 102. The destination device 116 can access the stored video data from the file server 114 via streaming or downloading. The file server 114 can be any type of server device capable of storing the encoded video data and sending the encoded video data to the destination device 116. The file server 114 can represent a web server (e.g., for a website), a File Transfer Protocol (FTP) server, a content delivery network device, or a Network Attached Storage (NAS) device. The destination device 116 can access the encoded video data from the file server 114 via 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., a Digital Subscriber Line (DSL), a cable modem, etc.), or a combination of both, suitable for accessing the encoded video data stored on the file server 114. The file server 114 and the input interface 122 can be configured to operate according to a streaming protocol, a download transfer protocol, or a combination thereof.

[0030] The output interface 108 and the input interface 122 can represent a wireless transmitter / receiver, a modem, a wired networking component (e.g., an Ethernet card), a wireless communication component operating according to any one of the various IEEE 802.11 standards, or other physical components. In examples where the output interface 108 and the input interface 122 include wireless components, the output interface 108 and the input interface 122 can be configured to transmit data (such as encoded video data) according to a cellular communication standard (such as 4G, 4G-LTE (Long Term Evolution), enhanced LTE, 5G, etc.). In some examples where the output interface 108 includes a wireless transmitter, the output interface 108 and the input interface 122 can be configured to transmit data (such as encoded video data) according to other wireless standards (such as the IEEE 802.11 specifications, the IEEE 802.15 specifications (e.g., ZigBee TM )、Bluetooth TM standards, etc.). In some examples, the source device 102 and / or the destination device 116 can include respective System-on-Chip (SoC) devices. For example, the source device 102 can include an SoC device for performing the functions ascribed to the video encoder 200 and / or the output interface 108, and the destination device 116 can include an SoC device for performing the functions ascribed to the video decoder 300 and / or the input interface 122.

[0031] The techniques of the present disclosure can be applied to video coding to support any of a variety of multimedia applications, such as over-the-air television broadcasting, cable television transmission, satellite television transmission, Internet streaming video transmission (such as HTTP-based Dynamic Adaptive Streaming over HTTP (DASH)), digital video encoded onto a data storage medium, decoding of digital video stored on a data storage medium, or other applications.

[0032] The input interface 122 of the destination device 116 receives an encoded video bitstream from a computer-readable medium 110 (e.g., a communication device, a storage device 112, a file server 114, etc.). The encoded video bitstream from the computer-readable medium 110 can include signaling information such as the following syntax elements (which are also used by the video decoder 300) defined by the video encoder 200: The syntax elements have values that describe the characteristics and / or processing of video blocks or other coding units (e.g., slices, pictures, groups of pictures, sequences, etc.). The display device 118 displays the decoded pictures of the decoded video data to the user. The display device 118 can represent any of a variety of display devices, such as a cathode ray tube (CRT), a liquid crystal display (LCD), a plasma display, an organic light emitting diode (OLED) display, or another type of display device.

[0033] 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 an audio decoder and can include appropriate MUX-DEMUX units or other hardware and / or software to process a multiplexed stream that includes both audio and video in a common data stream. If applicable, the MUX-DEMUX unit can follow the ITU H.223 multiplexer protocol or other protocols (such as the User Datagram Protocol (UDP)).

[0034] Video encoder 200 and video decoder 300 can each be implemented as any of a variety of suitable 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 technology is implemented partially in software, the device may store instructions for the software in a suitable non-transitory computer-readable medium and use one or more processors to execute the instructions in hardware to perform the techniques of the present disclosure. Each of video encoder 200 and video decoder 300 may be included in one or more encoders or decoders, and any of the encoders or decoders may be integrated as part of a combined encoder / decoder (CODEC) in a corresponding device. Devices including video encoder 200 and / or video decoder 300 may include integrated circuits, microprocessors, and / or wireless communication devices such as cellular phones.

[0035] Video encoder 200 and video decoder 300 may operate according to a video coding standard such as ITU-T H.265 (also known as the High Efficiency Video Coding (HEVC) standard) or an extension thereof such as multi-view and / or scalable video coding extensions. Alternatively, video encoder 200 and video decoder 300 may operate according to other proprietary or industry standards such as the Joint Exploration Test Model (JEM) or the ITU-T H.266 standard, also known as Versatile Video Coding (VVC). The draft of the VVC standard is described in the following document: Bross et al., "Versatile Video Coding (Draft4)", Joint Video Team (JVT) of ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11, 13th meeting: Marrakesh, Morocco, January 9-18, 2019, JVET-M1001-v5 (hereinafter referred to as "VVC Draft 4"). In other examples, video encoder 200 and video decoder 300 may operate according to one or more versions of the MPEG-5 / EVC (Essential Video Coding) standard being developed. However, the techniques of the present disclosure are not limited to any particular coding standard.

[0036] Generally, video encoder 200 and video decoder 300 may perform block-based coding of pictures. The term "block" generally refers to a structure that includes data to be processed (e.g., to be encoded, decoded, or otherwise used during an encoding and / or decoding process). For example, a block may include a two-dimensional matrix of samples of luminance and / or chrominance data. Generally, video encoder 200 and video decoder 300 may code video data represented in a YUV (e.g., Y, Cb, Cr) format. That is, instead of coding red, green, and blue (RGB) data for samples of a picture, video encoder 200 and video decoder 300 may code luminance and chrominance components, where the chrominance components may include both a red-hue and a blue-hue chrominance component. In some examples, video encoder 200 converts the received RGB-formatted data to a YUV representation before encoding, and video decoder 300 converts the YUV representation to an RGB format. Alternatively, a preprocessing unit and a postprocessing unit (not shown) may perform these conversions.

[0037] Generally speaking, the present disclosure may relate to coding (e.g., encoding and decoding) of pictures to include a process of encoding or decoding data of a picture. Similarly, the present disclosure may relate to coding of blocks of a picture to include a process of encoding or decoding data for a block (e.g., prediction and / or residual coding). An encoded video bitstream generally includes a series of values for representing coding decisions (e.g., coding modes) and syntax elements that partition a picture into blocks. Thus, a reference to coding a picture or a block should generally be understood as coding values of syntax elements that form the picture or the block.

[0038] HEVC defines various blocks, including coding units (CUs), prediction units (PUs), and transform units (TUs). Generally, a coding unit or other type of unit may refer to all of the luminance and / or chrominance blocks of a region of a picture. For example, a coding unit may include a luminance block, a Cr chrominance block, and a Cb chrominance block. In other examples, the luminance blocks and chrominance blocks are split independently. In this example, blocks and units may be synonymous. According to HEVC, a video decoder (such as video encoder 200) splits a coding tree unit (CTU) into CUs according to a quadtree structure. That is, the video decoder splits the CTU and CUs into four equal, non-overlapping squares, and each node of the quadtree has zero or four children. A node without children may be referred to as a "leaf node", and the CU of such a leaf node may include one or more PUs and / or one or more TUs. The video decoder may further split the PUs and TUs. For example, in HEVC, a residual quadtree (RQT) represents the splitting of TUs. In HEVC, a PU represents inter-prediction data, while a TU represents residual data. A CU predicted intra-frame includes intra-frame prediction information, such as an intra-mode indicator.

[0039] As another example, video encoder 200 and video decoder 300 may be configured to operate according to JEM or VVC. According to EVC, JEM, or VVC, a video decoder (such as video encoder 200) splits a picture into multiple coding tree units (CTUs). Video encoder 200 may split the 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 concept of multiple splitting types, such as the separation between CUs, PUs, and TUs in HEVC. The QTBT structure includes two levels: a first level split according to quadtree splitting, and a second level split according to binary tree splitting. The root node of the QTBT structure corresponds to the CTU. The leaf nodes of the binary tree correspond to coding units (CUs).

[0040] In the MTT splitting structure, quadtree (QT) splitting, binary tree (BT) splitting, and one or more types of ternary tree (TT) splitting may be used to split blocks. Ternary tree splitting is a splitting in which a block is split into three sub-blocks. In some examples, ternary tree splitting divides a block into three sub-blocks without dividing the original block through the center. The splitting types in the MTT (e.g., QT, BT, and TT) may be symmetric or asymmetric.

[0041] In some examples, video encoder 200 and video decoder 300 may use a single QTBT or MTT structure to represent each of the luminance and chrominance components, while in other examples, video encoder 200 and video decoder 300 may use two or more QTBT or MTT structures, such as one QTBT / MTT structure for the luminance component and another QTBT / MTT structure for the two chrominance components (or two QTBT / MTT structures for the respective chrominance components).

[0042] Video encoder 200 and video decoder 300 may be configured to use quadtree partitioning, QTBT partitioning, MTT partitioning, or other partitioning structures per HEVC. For purposes of explanation, a description of the techniques of the present disclosure is given with respect to QTBT partitioning. However, it should be understood that the techniques of the present disclosure may also be applied to video decoders configured to use quadtree partitioning or also use other types of partitioning.

[0043] The present disclosure may interchangeably use "NxN" and "N by N" to refer to the sample size of a block (such as a CU or other video block) in the vertical and horizontal dimensions. For example, 16x16 samples or 16 by 16 samples. Generally, a 16x16 CU will have 16 samples in the vertical direction (y = 16) and 16 samples in the horizontal direction (x = 16). Similarly, an NxN CU generally has N samples in the vertical direction and N samples in the horizontal direction, where N represents a non-negative integer value. The samples in a CU may be arranged in rows and columns. Additionally, a CU does not necessarily need to have the same number of samples in the horizontal direction as in the vertical direction. For example, a CU may include NxM samples, where M does not necessarily equal N.

[0044] Video encoder 200 encodes video data representing prediction and / or residual information and other information for a CU. The prediction information indicates how the CU is to be predicted to form a prediction block for the CU. The residual information generally represents the sample-by-sample difference between the samples of the CU before encoding and the prediction block.

[0045] To predict a CU, the video encoder 200 can generally form a prediction block for the CU through inter - prediction or intra - prediction. Inter - prediction generally refers to predicting the CU based on data from previously decoded pictures, while intra - prediction generally refers to predicting the CU based on previously decoded data from the same picture. To perform inter - prediction, the video encoder 200 can use one or more motion vectors to generate the prediction block. 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 the difference between the CU and the reference block. The video encoder 200 can calculate a difference metric using the sum of absolute differences (SAD), sum of squared differences (SSD), mean absolute difference (MAD), mean squared difference (MSD), or other such difference calculations to determine whether the reference block closely matches the current CU. In some examples, the video encoder 200 can use uni - directional prediction or bi - directional prediction to predict the current CU.

[0046] Some examples of EVC, JEM, and VVC also provide an affine motion compensation mode, which can be considered an inter - prediction mode. In the affine motion compensation mode, the video encoder 200 can determine two or more motion vectors representing non - translational motion, such as zooming in or out, rotation, perspective motion, or other irregular motion types.

[0047] To perform intra - prediction, the video encoder 200 can select an intra - prediction mode to generate the prediction block. Some examples of EVC, JEM, and VVC provide sixty - seven intra - prediction modes, including various directional modes, as well as a planar mode and a DC mode. Generally, the video encoder 200 selects an intra - prediction mode that describes the neighboring samples of the current block (e.g., the block of the CU) from which the samples of the current block are to be predicted. Assuming the video encoder 200 decodes CTUs and CUs in a raster scan order (from left to right, top to bottom), such samples can generally be above, top - left, or to the left of the current block in the same picture as the current block.

[0048] The video encoder 200 encodes data representing the prediction mode for the current block. For example, for an inter - prediction mode, the video encoder 200 can encode data representing which of the various available inter - prediction modes is used and the motion information for the corresponding mode. For uni - directional or bi - directional inter - prediction, for example, the video encoder 200 can use advanced motion vector prediction (AMVP) or the merge mode to encode the motion vectors. The video encoder 200 can use a similar mode to encode the motion vectors for the affine motion compensation mode.

[0049] After prediction such as intra prediction or inter prediction of a block, video encoder 200 may compute residual data for the block. Residual data, such as a residual block, represents the sample-by-sample difference between the block and a predicted block for the block, which is formed using a corresponding prediction mode. Video encoder 200 may apply one or more transforms to the residual block to produce transformed data in the transform domain rather than in the sample domain. For example, video encoder 200 may apply a discrete cosine transform (DCT), an integer transform, a wavelet transform, or a conceptually similar transform to the residual video data. Additionally, video encoder 200 may 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), etc. Video encoder 200 produces transform coefficients after applying one or more transforms.

[0050] As described above, after any transform to produce transform coefficients, video encoder 200 may perform quantization of the transform coefficients. Quantization generally refers to the process in which the transform coefficients are quantized to potentially reduce the amount of data used to represent the coefficients, thereby providing further compression. By performing the quantization process, video encoder 200 may reduce the bit depth associated with some or all of the coefficients. For example, video encoder 200 may round an n-bit value down to an m-bit value during quantization, where n is greater than m. In some examples, to perform quantization, video encoder 200 may perform a bitwise right shift on the value to be quantized.

[0051] After quantization, video encoder 200 may scan the transform coefficients to produce a one-dimensional vector from a two-dimensional matrix including the quantized transform coefficients. The scan may be designed to place higher energy (and thus lower frequency) coefficients at the front of the vector and lower energy (and thus higher frequency) transform coefficients at the back of the vector. In some examples, video encoder 200 may use a predefined scan order to scan the quantized transform coefficients to produce a serialized vector, and then entropy code the quantized transform coefficients of the vector. In other examples, video encoder 200 may perform adaptive scanning. After scanning the quantized transform coefficients to form a one-dimensional vector, video encoder 200 may entropy code the one-dimensional vector, for example, according to context-adaptive binary arithmetic coding (CABAC). Video encoder 200 may also entropy code the values of syntax elements used to describe metadata associated with the encoded video data for use by video decoder 300 when decoding the video data.

[0052] To perform CABAC, the video encoder 200 may assign contexts within a context model to symbols to be sent. The context may relate to, for example, whether adjacent values of the symbol are zero values. Probability determination may be based on the context assigned to the symbol.

[0053] The video encoder 200 may also generate syntax data (such as block-based syntax data, picture-based syntax data, and sequence-based syntax data) or other syntax data (such as sequence parameter set (SPS), picture parameter set (PPS), or video parameter set (VPS)) for the video decoder 300, for example, in a picture header, a block header, or a slice header. Similarly, the video decoder 300 may decode such syntax data to determine how to decode the corresponding video data.

[0054] In this way, the video encoder 200 may generate a bitstream that includes encoded video data, for example, syntax elements that describe the segmentation of a picture into blocks (e.g., CUs) and prediction and / or residual information for the blocks. Finally, the video decoder 300 may receive the bitstream and decode the encoded video data.

[0055] Generally, the video decoder 300 performs a process opposite to that performed by the video encoder 200 to decode the encoded video data of the bitstream. For example, the video decoder 300 may use CABAC to decode the values of the syntax elements for the bitstream in a manner that is substantially similar to, but opposite to, the CABAC encoding process of the video encoder 200. The syntax elements may define segmentation information for dividing a picture into CTUs and for further dividing each CTU according to a corresponding segmentation structure (such as a QTBT structure) to define the CUs of the CTU. The syntax elements may also define prediction and residual information for blocks (e.g., CUs) of the video data.

[0056] The residual information may be represented by, for example, quantized transform coefficients. The video decoder 300 may inverse-quantize and inverse-transform the quantized transform coefficients of a block to reproduce the residual block for the block. The video decoder 300 uses a signal-informed prediction mode (intra prediction or inter prediction) and associated prediction information (e.g., motion information for inter prediction) to form a prediction block for the block. The video decoder 300 may then combine the prediction block and the residual block (on a sample-by-sample basis) to reproduce the original block. The video decoder 300 may perform additional processing, such as performing a deblocking process to reduce visual artifacts along the boundaries of the blocks.

[0057] According to the techniques of the present disclosure, as will be explained in more detail below, the video encoder 200 may be configured to: determine a syntax element indicating a position of a last significant coefficient in a transform block of a current block of video data; binarize the syntax element into one or more binary numbers; use a function of the size of the transform block to determine a respective context for each of the one or more binary numbers of the syntax element indicating the position of the last significant coefficient, wherein the function outputs contexts such that the same context is not used for transform blocks of different sizes; and entropy code the one or more binary numbers of the syntax element indicating the position of the last significant coefficient using the determined context.

[0058] Similarly, the video decoder 300 may be configured to: receive entropy decoded data for a current block of video data, wherein the entropy decoded data includes entropy decoded data for a syntax element indicating a position of a last significant coefficient in a transform block of the current block; use a function of the size of the transform block to determine a respective context for each of the one or more binary numbers of the entropy decoded data for the syntax element indicating the position of the last significant coefficient, wherein the function outputs the respective contexts such that the same context is not used for transform blocks of different sizes; and decode the entropy decoded data for the syntax element indicating the position of the last significant coefficient using the determined respective context.

[0059] Generally speaking, the present disclosure may relate to "signaling" certain information (such as syntax elements). The term "signaling" generally may refer to the conveyance of values for syntax elements and / or other data used to decode encoded video data. That is, the video encoder 200 may signal the value for a syntax element in a bitstream. Generally, signaling refers to generating a value in a bitstream. As described above, the source device 102 may transmit the bitstream to the destination device 116 substantially in real time or not in real time (such as may occur when storing the syntax element to the storage device 112 for later retrieval by the destination device 116).

[0060] Figure 2 is a block diagram illustrating an example video encoder 200 that may perform the last significant coefficient decoding techniques of the present disclosure. Figure 2 is provided for purposes of explanation and should not be considered to limit the techniques generally illustrated and described in the present disclosure. For purposes of explanation, the present disclosure describes the video encoder 200 in the context of video coding standards such as the HEVC video coding standard and the EVC and VVC video coding standards being developed. However, the techniques of the present disclosure are not limited to these video coding standards and generally apply to video encoding and decoding.

[0061] InFigure 2 In the example of Figure 2 , the video encoder 200 includes a video data memory 230, a mode selection unit 202, a residual generation unit 204, a transform processing unit 206, a quantization unit 208, an inverse quantization unit 210, an inverse transform processing unit 212, a reconstruction unit 214, a filter unit 216, a decoded picture buffer (DPB) 218, and an entropy encoding unit 220. Any one or all of the video data memory 230, the mode selection unit 202, the residual generation unit 204, the transform processing unit 206, the quantization unit 208, the inverse quantization unit 210, the inverse transform processing unit 212, the reconstruction unit 214, the filter unit 216, the DPB 218, and the entropy encoding unit 220 may be implemented in one or more processors or in processing circuitry. Additionally, the video encoder 200 may include additional or alternative processors or processing circuitry to perform these and other functions.

[0062] The video data memory 230 may store video data to be encoded by components of the video encoder 200. The video encoder 200 may receive the video data stored in the video data memory 230 from, for example, a video source 104 ( Figure 1 ). The DPB 218 may act as a reference picture memory that stores reference video data for use in predicting subsequent video data by the video encoder 200. The video data memory 230 and the DPB 218 may be formed of any one of a variety of memory devices, such as dynamic random access memory (DRAM) (including synchronous DRAM (SDRAM)), magnetoresistive RAM (MRAM), resistive RAM (RRAM), or other types of memory devices. The video data memory 230 and the DPB 218 may be provided by the same memory device or separate memory devices. In various examples, the video data memory 230 may be on-chip (as shown) with other components of the video encoder 200, or off-chip relative to those components.

[0063] In the present disclosure, a reference to the video data memory 230 should not be construed as being limited to a memory internal to the video encoder 200 (unless so specifically described), or to a memory external to the video encoder 200 (unless so specifically described). Rather, a reference to the video data memory 230 should be understood as a reference memory that stores the video data received by the video encoder 200 for encoding (e.g., the video data for the current block to be encoded). Figure 1 The memory 106 of Figure 1 may also provide temporary storage of the outputs from the various units of the video encoder 200.

[0064] shows Figure 2The various units are to assist in understanding the operations performed by the video encoder 200. These units can be implemented as fixed-function circuits, programmable circuits, or a combination thereof. Fixed-function circuits refer to circuits that provide a specific function and are preset with respect to the operations that can be performed. Programmable circuits refer to circuits that can be programmed to perform various tasks and provide flexible functionality with respect to the operations that can be performed. For example, a programmable circuit can execute software or firmware that causes the programmable circuit to operate in a manner defined by the instructions of the software or firmware. Fixed-function circuits can execute software instructions (e.g., to receive parameters or output parameters), but the types of operations performed by fixed-function circuits are generally immutable. In some examples, one or more of these units can be different circuit blocks (fixed-function or programmable), and in some examples, one or more units can be integrated circuits.

[0065] The video encoder 200 can include an arithmetic logic unit (ALU), a basic function unit (EFU), digital circuits, analog circuits, and / or programmable cores formed by programmable circuits. In examples where software executed by programmable circuits is used to perform the operations of the video encoder 200, the memory 106 ( Figure 1 ) can store the object code of the software received and executed by the video encoder 200, or another memory (not shown) within the video encoder 200 can store such instructions.

[0066] The video data memory 230 is configured to store the received video data. The video encoder 200 can retrieve pictures of the video data from 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 the original video data to be encoded.

[0067] The mode selection unit 202 includes a motion estimation unit 222, a motion compensation unit 224, and an intra prediction unit 226. The mode selection unit 202 can include additional functional units that perform video prediction according to other prediction modes. As an example, the mode selection unit 202 can include a palette unit, a block copy unit (which can be part of the motion estimation unit 222 and / or the motion compensation unit 224), an affine unit, a linear model (LM) unit, etc.

[0068] The mode selection unit 202 generally coordinates multiple encoding passes to test combinations of encoding parameters and the rate-distortion values obtained for such combinations. The encoding parameters can include splitting a CTU into CUs, the prediction mode for a CU, the transform type for the residual data of a CU, the quantization parameter for the residual data of a CU, and the like. The mode selection unit 202 can ultimately select the combination of encoding parameters that has a better rate-distortion value than other tested combinations.

[0069] The video encoder 200 can split a picture retrieved from the video data memory 230 into a series of CTUs and encapsulate one or more CTUs within a slice. The mode selection unit 202 can split the CTUs of the picture according to a tree structure (such as the QTBT structure or the quadtree structure of HEVC as described above). As described above, the video encoder 200 can form one or more CUs by splitting CTUs according to a tree structure. Such CUs can generally also be referred to as "video blocks" or "blocks".

[0070] Generally, the mode selection unit 202 also controls its components (e.g., the motion estimation unit 222, the motion compensation unit 224, and the intra prediction unit 226) to generate a prediction block for a current block (e.g., the current CU, or the overlapping portion of the PU and TU in HEVC). To perform inter prediction on the 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 pictures (e.g., one or more previously decoded pictures stored in the DPB 218). Specifically, the motion estimation unit 222 can calculate a value representing how closely a potential reference block will resemble 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 difference (MSD), etc. The motion estimation unit 222 can generally use the per-sample differences between the current block and the considered reference block to perform these calculations. The motion estimation unit 222 can identify the reference block with the lowest value obtained from these calculations, which indicates the reference block that most closely matches the current block.

[0071] The motion estimation unit 222 may form one or more motion vectors (MVs) that define the position of a reference block in a reference picture relative to the position of a current block in a current picture. The motion estimation unit 222 may then provide the motion vectors to the motion compensation unit 224. For example, for uni-directional inter prediction, the motion estimation unit 222 may provide a single motion vector, and for bi-directional inter prediction, the motion estimation unit 222 may provide two motion vectors. The motion compensation unit 224 may then use the motion vectors to generate a prediction block. For example, the motion compensation unit 224 may use the motion vectors to retrieve data of the reference block. As another example, if the motion vectors have fractional sample precision, the motion compensation unit 224 may interpolate values for the prediction block according to one or more interpolation filters. Further, for bi-directional inter prediction, the motion compensation unit 224 may retrieve data for two reference blocks identified by the respective motion vectors and combine the retrieved data, for example, by sample-by-sample averaging or weighted average.

[0072] As another example, for intra prediction or intra prediction coding, the intra prediction unit 226 may generate a prediction block according to samples adjacent to the current block. For example, for a directional mode, the intra prediction unit 226 may generally mathematically combine values of adjacent samples and fill the calculated values across the current block in a defined direction to produce the prediction block. As another example, for the DC mode, the intra prediction unit 226 may calculate an average of adjacent samples of the current block and generate a prediction block to include the obtained average for each sample of the prediction block.

[0073] The mode selection unit 202 provides the prediction block to the residual generation unit 204. The residual generation unit 204 receives an original, unencoded version of the current block from the video data memory 230 and receives the prediction block from the mode selection unit 202. The residual generation unit 204 calculates the sample-by-sample difference between the current block and the prediction block. The resulting sample-by-sample difference defines a residual block for the current block. In some examples, the residual generation unit 204 may take differences between sample values in the residual block to generate the residual block using residual differential pulse coding modulation (RDPCM). In some examples, one or more subtractor circuits performing binary subtraction may be used to form the residual generation unit 204.

[0074] In an example where the mode selection unit 202 divides a CU into PUs, each PU may be associated with a luminance prediction unit and a corresponding chrominance prediction unit. The video encoder 200 and the video decoder 300 may support PUs of various sizes. As pointed out above, the size of a CU may refer to the size of the luminance decoding block of the CU, and the size of a PU may refer to the size of the luminance prediction unit of the PU. Assuming that the size of a specific CU is 2Nx2N, the video encoder 200 may support PU sizes of 2Nx2N or NxN for intra prediction, and PU sizes of 2Nx2N, 2NxN, Nx2N, NxN or similar symmetric PU sizes for inter prediction. The video encoder 200 and the video decoder 300 may also support asymmetric partitioning for PU sizes of 2NxnU, 2NxnD, nLx2N, and nRx2N for inter prediction.

[0075] In an example where the mode selection unit does not further divide a CU into PUs, each CU may be associated with a luminance decoding block and a corresponding chrominance decoding block. As described above, the size of a CU may refer to the size of the luminance decoding block of the CU. The video encoder 200 and the video decoder 300 may support CU sizes of 2Nx2N, 2NxN or Nx2N.

[0076] For other video decoding techniques (to name a few examples such as intra-block copy mode decoding, affine mode decoding, and linear model (LM) mode decoding), the mode selection unit 202 generates a prediction block for the current block being encoded via a corresponding unit associated with the decoding technique. In some examples (such as palette mode decoding), the mode selection unit 202 may not generate a prediction block, but instead generate a syntax element indicating the way to reconstruct the block based on the selected palette. In such a mode, the mode selection unit 202 may provide these syntax elements to the entropy encoding unit 220 for encoding.

[0077] As described above, the residual generation unit 204 receives the video data for the current block and the corresponding prediction block. Then, the residual generation unit 204 generates a residual block for the current block. To generate the residual block, the residual generation unit 204 calculates the sample-by-sample difference between the prediction block and the current block.

[0078] The transform processing unit 206 applies one or more transforms to the residual block to generate a block of transform coefficients (referred to herein as a "transform coefficient block"). The transform processing unit 206 may apply various transforms to the residual block to form a transform coefficient block. For example, the transform processing unit 206 may apply a discrete cosine transform (DCT), a directional transform, a Karhunen-Loeve transform (KLT), or a conceptually similar transform to the residual block. In some examples, the transform processing unit 206 may perform multiple transforms on the residual block, e.g., a primary transform and a secondary transform (such as a rotation transform). In some examples, the transform processing unit 206 does not apply a transform to the residual block.

[0079] The quantization unit 208 may quantize the transform coefficients in the transform coefficient block to produce a quantized transform coefficient block. The quantization unit 208 may quantize the transform coefficients of the transform coefficient block according to the quantization parameter (QP) value associated with the current block. The video encoder 200 (e.g., via the mode selection unit 202) may adjust the degree of quantization applied to the transform coefficient block associated with the current block by adjusting the QP value associated with the CU. Quantization may cause information loss, and thus, the quantized transform coefficients may have lower precision compared to the original transform coefficients generated by the transform processing unit 206.

[0080] The inverse quantization unit 210 and the inverse transform processing unit 212 may apply inverse quantization and inverse transform to the quantized transform coefficient block, respectively, to reconstruct the residual block from the transform coefficient block. The reconstruction unit 214 may generate a reconstructed block corresponding to the current block (although potentially with some degree of distortion) based on the reconstructed residual block and the prediction block generated by the mode selection unit 202. For example, the reconstruction unit 214 may add the samples of the reconstructed residual block to the corresponding samples from the prediction block generated by the mode selection unit 202 to produce the reconstructed block.

[0081] The filter unit 216 may perform one or more filter operations on the reconstructed block. For example, the filter unit 216 may perform a deblocking operation to reduce block effect artifacts along the edges of the CU. In some examples, the operation of the filter unit 216 may be skipped.

[0082] Video encoder 200 stores the reconstructed blocks in DPB 218. For example, in an example where the operation of filter unit 216 is not required, reconstruction unit 214 may store the reconstructed blocks into DPB 218. In an example where the operation of filter unit 216 is required, filter unit 216 may store the filtered reconstructed blocks into DPB 218. Motion estimation unit 222 and motion compensation unit 224 may retrieve reference pictures formed by the reconstructed (and potentially filtered) blocks from DPB 218 to perform inter prediction on blocks of subsequently encoded pictures. Additionally, intra prediction unit 226 may use the reconstructed blocks of the current picture in DPB 218 to perform intra prediction on other blocks in the current picture.

[0083] Generally, entropy coding unit 220 may perform entropy coding on syntax elements received from other functional components of video encoder 200. For example, entropy coding unit 220 may perform entropy coding on the quantized transform coefficient blocks from quantization unit 208. As another example, entropy coding unit 220 may perform entropy coding on prediction syntax elements (e.g., motion information for inter prediction or intra mode information for intra prediction) from mode selection unit 202. Entropy coding unit 220 may perform one or more entropy coding operations on syntax elements as another example of video data to generate entropy-coded data. For example, entropy coding unit 220 may perform context adaptive variable length coding (CAVLC) operations, CABAC operations, variable-variable (V2V) length coding operations, syntax-based context adaptive binary arithmetic coding (SBAC) operations, probability interval partitioning entropy (PIPE) coding operations, exponential Golomb coding operations, or another type of entropy coding operation on the data. In some examples, entropy coding unit 220 may operate in a bypass mode where the syntax elements are not entropy coded.

[0084] According to the techniques of the present disclosure that will be explained in more detail below, entropy coding unit 220 may also be configured to: encode one or more binary numbers of a syntax element that indicates the X or Y position of the last significant coefficient in a transform block. The last significant coefficient position is the position of the last non-zero transform coefficient along the coefficient scan order. Video decoder 300 may use the position of the last significant coefficient to determine where to start the reverse scan order of the transform coefficients in the transform block.

[0085] The entropy coding unit 220 may be configured to: determine a syntax element indicating a position of a last significant coefficient in a transform block of a current block of video data; binarize the syntax element into one or more binary numbers; use a function of the size of the transform block to determine a respective context of each of the one or more binary numbers of the syntax element indicating the position of the last significant coefficient, wherein the function outputs contexts such that the same context is not used for transform blocks of different sizes; and entropy code the one or more binary numbers of the syntax element indicating the position of the last significant coefficient using the determined context. As described above, by using a function that outputs contexts such that the same context is not used for transform blocks of different sizes, compared to techniques that reuse the same context between different block sizes, decoding efficiency can be improved and / or the resulting decoded video data may exhibit less distortion.

[0086] In one example of the present disclosure, the entropy coding unit 220 may be configured to encode a 64x64 transform block. In this example, the entropy coding unit 220 may be configured to use a first function to determine a respective context of each of the one or more binary numbers of the syntax element indicating the position of the last significant coefficient in the 64x64 transform block, wherein the first function is different from a second function that is used to determine a respective context of each of the one or more binary numbers of the syntax element indicating the position of the last significant coefficient in a 32x32 transform block.

[0087] The video encoder 200 may output a bitstream that includes the entropy-coded syntax elements needed to reconstruct the blocks of a slice or picture. Specifically, the entropy coding unit 220 may output the bitstream.

[0088] The above operations have been described with respect to blocks. Such a description should be understood as applying to operations for a luminance decoding block and / or a chrominance decoding block. As described above, in some examples, the luminance decoding block and the chrominance decoding block are the luminance and chrominance components of a CU. In some examples, the luminance decoding block and the chrominance decoding block are the luminance and chrominance components of a PU.

[0089] In some examples, it is not necessary to repeat the operations performed on the luminance coding block for the chrominance decoding block. As an example, it is not necessary to repeat the operations for identifying the motion vector (MV) and reference picture for the luminance decoding block to identify the MV and reference picture for the chrominance block. Rather, the MV for the luminance decoding block may be scaled to determine the MV for the chrominance block, and the reference picture may be the same. As another example, the intra prediction process may be the same for the luminance decoding block and the chrominance decoding block.

[0090] Figure 3is a block diagram showing an example video decoder 300 that can perform the last valid coefficient decoding technique of the present disclosure. Figure 3 is provided for explanatory purposes and does not limit the techniques generally illustrated and described in the present disclosure. For explanatory purposes, the present disclosure describes the video decoder 300 in accordance with the techniques of EVC, VVC, and HEVC. However, the techniques of the present disclosure can be performed by a video coding device configured for other video coding standards.

[0091] In Figure 3 the example, the video decoder 300 includes a coded picture buffer (CPB) memory 320, an entropy decoding unit 302, a prediction processing unit 304, an inverse quantization unit 306, an inverse transform processing unit 308, a reconstruction unit 310, a filter unit 312, and a decoded picture buffer (DPB) 134. Any one or all of the CPB memory 320, the entropy 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 134 can be implemented in one or more processors or in processing circuitry. Additionally, the video decoder 300 can include additional or alternative processors or processing circuitry to perform these and other functions.

[0092] The prediction processing unit 304 includes a motion compensation unit 316 and an intra prediction unit 318. The prediction processing unit 304 can include an addition unit that performs prediction according to other prediction modes. As an example, the prediction processing unit 304 can include a palette unit, a block copy unit (which can form part of the motion compensation unit 316), an affine unit, a linear model (LM) unit, etc. In other examples, the video decoder 300 can include more, fewer, or different functional components.

[0093] The CPB memory 320 can store video data to be decoded by components of the video decoder 300, such as an encoded video bitstream. For example, it can be from a computer-readable medium 110 ( Figure 1)Obtain video data stored in the CPB memory 320. The CPB memory 320 may include a CPB that stores encoded video data (e.g., syntax elements) from an encoded video bitstream. Additionally, the CPB memory 320 may store video data other than the syntax elements of decoded pictures, such as temporary data representing the outputs of various units from the video decoder 300. The DPB 314 generally stores decoded pictures, and the video decoder 300 may output decoded pictures and / or use the decoded pictures as reference video data when decoding subsequent data or pictures of the encoded video bitstream. The CPB memory 320 and the DPB 314 may be formed of any of a variety of memory devices, such as dynamic random access memory (DRAM), including synchronous DRAM (SDRAM), magnetoresistive RAM (MRAM), resistive RAM (RRAM), or other types of memory devices. The CPB memory 320 and the DPB 314 may be provided by the same memory device or separate memory devices. In various examples, the CPB memory 320 may be on-chip with other components of the video decoder 300 or off-chip relative to those components.

[0094] Additionally or alternatively, in some examples, the video decoder 300 may retrieve decoded video data from the memory 120( Figure 1 ). That is, the memory 120 may utilize the CPB memory 320 to store data as discussed above. Similarly, when some or all of the functions of the video decoder 300 are implemented with software to be executed by the processing circuitry of the video decoder 300, the memory 120 may store instructions to be executed by the video decoder 300.

[0095] is shown Figure 3 the various units shown in to assist in understanding the operations performed by the video decoder 300. These units may be implemented as fixed-function circuitry, programmable circuitry, or a combination thereof. Similar to Figure 2 , fixed-function circuitry refers to circuitry that provides a specific function and is pre-set with respect to the operations that can be performed. Programmable circuitry refers to circuitry that can be programmed to perform various tasks and provides flexible functionality with respect to the operations that can be performed. For example, programmable circuitry may execute software or firmware that causes the programmable circuitry to operate in a manner defined by the instructions of the software or firmware. Fixed-function circuitry may execute software instructions (e.g., to receive parameters or output parameters), but the type of operations performed by the fixed-function circuitry is generally immutable. In some examples, one or more of these units may be different circuit blocks (fixed-function or programmable), and in some examples, one or more of the units may be integrated circuits.

[0096] The video decoder 300 may include an ALU, an EFU, digital circuits, analog circuits, and / or programmable cores formed by programmable circuits. In an example where the operations of the video decoder 300 are performed by software executed on the programmable circuits, on-chip or off-chip memory may store instructions (e.g., object code) of the software that the video decoder 300 receives and executes.

[0097] The entropy decoding unit 302 may receive the encoded video data from the CPB and perform entropy decoding on 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 may generate the decoded video data based on the syntax elements extracted from the bitstream.

[0098] Generally, the video decoder 300 reconstructs pictures block by block. The video decoder 300 may perform the reconstruction operation on each block individually (where the block currently being reconstructed (i.e., decoded) may be referred to as the "current block").

[0099] The entropy decoding unit 302 may perform entropy decoding on the syntax elements defining the quantized transform coefficients of the quantized transform coefficient block and transform information such as quantization parameter (QP) and / or transform mode indication. The inverse quantization unit 306 may use the QP associated with the quantized transform coefficient block to determine the quantization level, and similarly, determine the inverse quantization level to be applied by the inverse quantization unit 306. The inverse quantization unit 306 may perform, for example, a bitwise left shift operation to inverse-quantize the quantized transform coefficients. The inverse quantization unit 306 may thus form a transform coefficient block including transform coefficients.

[0100] According to the techniques of the present disclosure to be explained in more detail below, the entropy decoding unit 302 may also be configured to: decode one or more binary numbers of a syntax element that indicates the X or Y position of the last significant coefficient in a transform block. The last significant coefficient position is the position of the last non-zero transform coefficient along the scan order. The entropy decoding unit 302 may use the position of the last significant coefficient to determine where to start the reverse scan order of the transform coefficients in the transform block.

[0101] The entropy decoding unit 302 may be configured to: receive entropy-coded data for a current block of video data, where the entropy-coded data includes entropy-coded data for a syntax element indicating the position of the last significant coefficient in a transform block of the current block. The entropy decoding unit 302 may use a function of the size of the transform block to determine a respective context for each binary number of one or more binary numbers of the entropy-coded data for the syntax element indicating the position of the last significant coefficient, where the function outputs the respective context such that the same context is not used for transform blocks of different sizes; and use the determined respective contexts to decode the entropy-coded data for the syntax element indicating the position of the last significant coefficient. As described above, by using one or more functions that output contexts such that the same context is not used for transform blocks of different sizes, compared to techniques that reuse the same context between different block sizes, the decoding efficiency can be improved and / or the resulting decoded video data may exhibit less distortion.

[0102] In one example of the present disclosure, the entropy decoding unit 302 may be configured to decode a 64x64 transform block. In this example, the entropy decoding unit 302 may be configured to use a first function to determine a respective context for each binary number of one or more binary numbers of the syntax element indicating the position of the last significant coefficient in the 64x64 transform block, where the first function is different from a second function that is used to determine a respective context for each binary number of one or more binary numbers of the entropy-coded data for the syntax element indicating the position of the last significant coefficient in a 32x32 transform block.

[0103] After the inverse quantization unit 306 forms a transform coefficient block, the inverse transform processing unit 308 may 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 may apply an inverse DCT, an inverse integer transform, an inverse Karhunen-Loeve transform (KLT), an inverse rotation transform, an inverse direction transform, or another inverse transform to the transform coefficient block.

[0104] In addition, the prediction processing unit 304 generates a prediction block based on prediction information syntax elements entropy-decoded by the entropy decoding unit 302. For example, if the prediction information syntax element indicates that the current block is inter-predicted, the motion compensation unit 316 may generate a prediction block. In this case, the prediction information syntax element may indicate a reference picture in the DPB 314 from which a reference block is to be retrieved, and a motion vector that identifies the position of the reference block in the reference picture relative to the position of the current block in the current picture. The motion compensation unit 316 may generally operate in a manner similar to that of the motion compensation unit 224 ( Figure 2)perform the inter prediction process in a manner substantially similar to the described manner.

[0105] As another example, if the prediction information syntax element indicates that the current block is intra-predicted, the intra prediction unit 318 may generate a prediction block according to the intra prediction mode indicated by the prediction information syntax element. Again, the intra prediction unit 318 can generally perform the intra prediction process in a manner substantially similar to the manner described with respect to the intra prediction unit 226 ( Figure 2 )perform the intra prediction process in a manner substantially similar to the described manner. The intra prediction unit 318 may retrieve data of adjacent samples of the current block from the DPB 314.

[0106] The reconstruction unit 310 may use the prediction block and the residual block to reconstruct the current block. For example, the reconstruction unit 310 may add the samples of the residual block to the corresponding samples of the prediction block to reconstruct the current block.

[0107] The filter unit 312 may perform one or more filter operations on the reconstructed block. For example, the filter unit 312 may perform a deblocking operation to reduce block effect artifacts along the edges of the reconstructed block. The operation of the filter unit 312 is not necessarily performed in all examples.

[0108] The video decoder 300 may store the reconstructed block in the DPB 314. For example, in an example where the operation of the filter unit 312 is not performed, the reconstruction unit 310 may store the reconstructed block into the DPB 314. In an example where the operation of the filter unit 312 is performed, the filter unit 312 may store the filtered reconstructed block into the DPB 314. As discussed above, the DPB 314 may provide reference information (such as samples of the current picture for intra prediction and previously decoded pictures for subsequent motion compensation) to the prediction processing unit 304. In addition, the video decoder 300 may output the decoded picture from the DPB for subsequent presentation on a display device such as Figure 1 a display device 118.

[0109] The following is a description of the encoding / decoding of the last position (e.g., the X or Y position of the last valid (e.g., non-zero) coefficient in a transform unit / block) in the HEVC Test Model (HM) software. In the present disclosure, a transform unit (TU) may generally refer to a block including any or all color components (e.g., YCbCr), while a transform block refers to a block of a specific color component. The "last" valid coefficient may be the last valid coefficient along a predefined scan pattern for the transform block. For example, the last valid coefficient position may be the position of the last non-zero transform coefficient along the forward scan pattern. The video decoder 300 may use the position of the last valid coefficient in the transform block to start the scan process for the transform block along the reverse scan pattern when entropy decoding the transform block.

[0110] In one example, encoding the last position includes two parts: binarization and CABAC encoding. Similarly, decoding the last position will include CABAC decoding followed by inverse binarization. The binarization process converts the position of the last significant coefficient (e.g., X or Y position) into a binary string. The binarization method used in HM is truncated unary plus fixed length coding. For the truncated unary code part (e.g., prefix), a CABAC context (e.g., probability model) is used to encode the binary number. For the fixed length part (e.g., suffix), a bypass mode (e.g., no context) is used to encode the binary number. The techniques of the present disclosure relate to determining the context used in encoding / decoding the binary number of the truncated unary code prefix syntax element. An example binarization for a 32x32 TU (transform unit / transform block) is shown in Table I below.

[0111] Table 1: Binarization for TU 32x32

[0112]

[0113] The context index ctxInc (e.g., an index specifying the particular context to be used for the binary number) for prefix syntax elements in HEVC is defined in Clause 9.3.4.2.3 cited below:

[0114] Derivation process of ctxInc for syntax elements last_sig_coeff_x_prefix and last_sig_coeff_y_prefix

[0115] The inputs to this process are the variables binIdx, color component index cIdx, and transform block size log2TrafoSize.

[0116] The output of this process is the variable ctxInc.

[0117] Derive the variables ctxOffset and ctxShift as follows:

[0118] – If cIdx is equal to 0, set ctxOffset to be equal to 3*(log2TrafoSize - 2)+((log2TrafoSize - 1)>>2), and set ctxShift to be equal to (log2TrafoSize + 1)>>2.

[0119] – Otherwise (cIdx is greater than 0), set ctxOffset to be equal to 15, and set ctxShift to be equal to log2TrafoSize - 2.

[0120] Derive the variable ctxInc as follows:

[0121] ctxInc = (binIdx >> ctxShift) + ctxOffset (9 - 25)

[0122] In the above part of HEVC, the prefix syntax elements for the X position and Y position of the last significant coefficient position are last_sig_coeff_x_prefix and last_sig_coeff_y_prefix. The variable binIdx indicates the binary number being decoded. For example, as shown in Table I, the last significant coefficient position of size 3 is represented by 4 bits in the truncated unary model prefix (e.g., last_sig_coeff_x_prefix or last_sig_coeff_y_prefix). These 4 bits are decoded into 4 different binary numbers (e.g., binary number 0, binary number 1, binary number 2, binary number 3). The variable binIdx specifies which of these binary numbers the video encoder 200 and the video decoder 300 will determine the context for.

[0123] The variable cIdx is the index specifying the color component. For example, cIdx equal to zero specifies the luminance (Y) component, and cIdx greater than zero specifies one of the Cr or Cb chrominance components. The transform block size (e.g., one-dimensional) is specified by the variable log2TrafoSize. For example, a 4x4 transform block will have a log2TrafoSize of 2 because the logarithm of 4 to the base 2 is 2. A 32x32 transform block will have a log2TrafoSize of 5 because the logarithm of 32 to the base 2 is 5.

[0124] The context (ctxInc) output from the above function is based on the context offset (ctxOffset) and the context shift (ctxShift), which are derived as a function of the color component (cIdx) and the transform block size (log2TrafoSize). For example, for the luminance component (i.e., cIdx = 0), determine ctxOffset and ctxShift as follows:

[0125] If cIdx is equal to 0, set ctxOffset to be equal to 3 * (log2TrafoSize - 2) + ((log2TrafoSize - 1) >> 2), and set ctxShift to be equal to (log2TrafoSize + 1) >> 2.

[0126] The operator >> is a logical right shift. Then, use ctxOffset, ctxShift, and binIdx to determine the context (ctxInc) as follows:

[0127] ctxInc = (binIdx >> ctxShift) + ctxOffset

[0128] The function for determining the context of the binary numbers for last_sig_coeff_x_prefix and / or last_sig_coeff_y_prefix as described above effectively yields the following derived results:

[0129] Table II Luma last_significant_coeff_X_prefix Context Assignment (Set A)

[0130]

[0131] However, with the introduction of large transform sizes in next-generation video codecs (e.g., VVC and EVC), the function for determining the context of the binary numbers for last_sig_coeff_x_prefix and last_sig_coeff_y_prefix as specified above does not provide a consistent pattern for transform sizes greater than 32. For example, see Table III below, which includes inadvertently shared context indices (bold and underlined) between different binary numbers for different TU sizes. Due to poor context adaptability, reusing the same context for different binary numbers between different transform sizes may effectively result in lower decoding efficiency. This is because the context is a probability model of the occurrence of 1 or 0 in a particular binary number. The binary numbers 6 or 7 at the last significant coefficient position of a 32x32 TU (or transform block) will generally have very different probabilities of being 0 or 1 compared to the binary number 0 or binary number 1 of a 64x64 TU. Therefore, reusing the context between different transform sizes may result in lower decoding efficiency and / or increased distortion.

[0132] Table III Luma last_significant_coeff_X_prefix Context Assignment (Note full binarization for TU64x64)

[0133]

[0134] In view of the deficiencies in context derivation for large transform block sizes identified above, the present disclosure describes techniques for determining the context of a binary number for a syntax element that is contextually decoded and that indicates the position of the last significant coefficient (e.g., last_sig_coeff_x_prefix and last_sig_coeff_y_prefix). In one example of the present disclosure, video encoder 200 and video decoder 300 may be configured to use another function (e.g., a function different from the function used in HEVC) to derive a context index for a binary number in last position decoding such that there is no problem of inadvertently sharing context indices. In an example of the present disclosure, the "function" for deriving the context index may include multiple sub-functions, where each sub-function may be used for transform blocks of different sizes. For example, video encoder 200 and video decoder 300 may be configured to use a function of the size of the transform block to derive the context of one or more binary numbers for a syntax element that indicates the position of the last significant coefficient of the transform block (e.g., last_significant_coeff_X_prefix, last_significant_coeff_Y_prefix), where the function outputs a context such that the same context is not used for transform blocks of different sizes.

[0135] In one example, video encoder 200 and video decoder 300 may be configured to use the following derivation of the context for the binary numbers for syntax elements last_sig_coeff_x_prefix and last_sig_coeff_y_prefix. An example of context derivation according to the techniques of the present disclosure is shown below. Portions of the following context derivation assist in ensuring that context indices are not inadvertently shared between transform block sizes. These portions are shown in bold and italic between the tags <add> and < / add>. For example, the example context derivation technique is an example of a function that video encoder 200 or video decoder 300 uses to determine contexts that are not the same for transform blocks of different sizes.

[0136] Derivation process of ctxInc for syntax elements last_sig_coeff_x_prefix and last_sig_coeff_y_prefix

[0137] The input to the process is the variables binIdx, color component index cIdx, and transform block size log2TrafoSize.

[0138] The output of the process is the variable ctxInc.

[0139] If cIdx is equal to 0, then the variables ctxOffset and ctxShift are derived as follows:

[0140] – If log2TrafoSizeX is less than or equal to 5, then set ctxOffset to be equal to 3 * (log2TrafoSizeX - 2) + ((log2TrafoSizeX - 1) >> 2), and set ctxShift to be equal to (log2TrafoSizeX + 1) >> 2, where the variable log2TrafoSizeX is equal to the log2TrafoSizeWidth for deriving the context for sig_coeff_x_prefix and is equal to the log2TrafoSizeHeight for deriving the context for sig_coeff_y_prefix.

[0141] – Otherwise if (log2TrafoSizeX is greater than 5), then set ctxOffset to be equal to 3 * (log2TrafoSizeX - 2) + ((log2TrafoSizeX - 1) >> 2) + ((TrafoSizeX >> 6) << 1) + (TrafoSizeX >> 7), and set ctxShift to be equal to (log2TrafoSizeX + 1) >> 2, where the variable log2TrafoSizeX is equal to the log2TrafoSizeWidth for deriving the context for sig_coeff_x_prefix and is equal to the log2TrafoSizeHeight for deriving the context for sig_coef_y_prefix.

[0142] Otherwise (cIdx is greater than 0), set ctxOffset to be equal to 25, and set ctxShift to be equal to log2TrafoSizeX – 2 – log2(TrafoSizeX >> 4), where the variable TrafoSizeX is equal to the TrafoSizeWidth of sig_coeff_x_prefix and is equal to the TrafoSizeHeight of sig_coef_y_prefix.

[0143] In the above equation, log2TrafoSizeWidth is the logarithm to the base 2 of the width of the transform block, and log2TrafoSizeHeight is the logarithm to the base 2 of the height of the transform block. As shown above, the clause stating "if log2TrafoSizeX is less than or equal to 5" is a function (or a sub-function of a function) for determining the context for transform blocks and / or TUs (e.g., 32x32 TU, 32x16 TU, 16x32 TU, etc.) with a specific dimension less than or equal to 32. The clause stating "otherwise (if log2TrafoSizeX is greater than 5)" is a different function (or a different sub-function of a function) for determining the context for transform blocks and / or TUs (e.g., 64x64 TU, 32x64 TU, 64x32 TU, etc.) with a specific dimension greater than 32.

[0144] In the functions defined above, for transform blocks with a specific dimension less than or equal to 32, the video encoder 200 and the video decoder 300 are configured to use the function 3*(log2TrafoSizeX - 2)+((log2TrafoSizeX - 1)>>2) to determine ctxOffset. This function for ctxOffset can generally be described as having a scale and an offset. For example, this function can generally be described as a*size+(b*size), where a*size=(log2TrafoSizeX - 2) is the scale, and b*size=((log2TrafoSizeX - 1)>>2) is the offset.

[0145] For transform blocks with a specific dimension greater than 32 (e.g., 64), the video encoder 200 and the video decoder 300 are configured to use the function 3*(log2TrafoSizeX - 2)+((log2TrafoSizeX - 1)>>2)+((TrafoSizeX>>6)<<1)+(TrafoSizeX>>7) to determine ctxOffset. That is, for transform blocks with a specific dimension greater than 32 (e.g., 64), the function for determining the context offset can be a combination of a linear operation and a non-linear operation, which takes the form of a scale, an offset, and a size-dependent offset with bit-shifting and clipping. For example, this function can generally be described as a*size+(b*size2 + c(size))+d(size). In this example, a*size and b*size are the same as defined above, and c(size) is (TrafoSizeX>>6)<<1 and d(size) is (TrafoSizeX>>7). The c(size) and d(size) parts of the function can be regarded as size-dependent offsets with bit-shifting and clipping, and are the non-linear parts of the function.

[0146] Table IV below shows fragments of context indices for different TU block sizes (incomplete results for TU 64x64), without sharing context indices for different binaries.

[0147] Table IV Luma last_significant_coeff_X_prefix context assignment (Set A)

[0148]

[0149] In view of the above, video decoder 300 (e.g., Figure 3 entropy decoding unit 302 thereof) can be configured to use one or more of the following techniques to determine a context for entropy decoding a binary number of a syntax element indicating the position of the last significant coefficient. Although described with reference to video decoder 300, it should be understood that video encoder 200 (e.g., Figure 2 entropy encoding unit 220 thereof) can also be configured to perform reciprocal techniques for determining a context for entropy encoding a binary number of a syntax element indicating the position of the last significant coefficient.

[0150] In an example of the present disclosure, video decoder 300 can be configured to receive entropy-coded data for a current block of video data, where the entropy-coded data includes entropy-coded data for a syntax element indicating the position of the last significant coefficient in a transform block of the current block. For example, the entropy-coded data for a syntax element indicating the position of the last significant coefficient in a transform block can be an entropy-coded binary number of a last_sig_coeff_x_prefix syntax element and / or a last_sig_coeff_y_prefix syntax element.

[0151] Video decoder 300 can also be configured to determine a respective context for each binary number of the entropy-coded data of a syntax element indicating the position of the last significant coefficient using a function of the size of the transform block. That is, video decoder 300 determines a context for each binary number of the entropy-coded binary numbers of the received syntax element. As shown in Table I, different numbers of binary numbers can be used to decode different sizes of the last position. Video decoder 300 determines a context for each binary number. According to the techniques of the present disclosure, a function (which can include different sub-functions depending on the size of the transform block) used by video decoder 300 to determine the respective context outputs the respective context such that the same context is not used for transform blocks of different sizes. Video decoder 300 can then use the determined respective context to decode the entropy-coded data for a syntax element indicating the position of the last significant coefficient.

[0152] In one example, the video decoder 300 may be configured to entropy decode the entropy-coded data for a 64-sample dimensional transform block. That is, the transform block has a size of 64 samples in the height and / or width of the block. For example, the video decoder 300 may determine a context for the last_sig_coeff_x_prefix syntax element for a transform block with a 64-sample width. Similarly, the video decoder 300 may determine a context for the last_sig_coeff_y_prefix syntax element for a transform block with a 64-sample height.

[0153] In this example, the video decoder 300 may be configured to use a first function to determine the respective context of each binary number in one or more binary numbers of the entropy-coded data of the syntax element indicating the position of the last significant coefficient for a 64-sample dimensional transform block. In the above example derivation, the first function for a 64-sample dimensional transform block is as follows:

[0154] Set ctxOffset to be equal to 3*(log2TrafoSizeX - 2)+((log2TrafoSizeX - 1)>>2)+((TrafoSizeX>>6)<<1)+(TrafoSizeX>>7), and set ctxShift to be equal to (log2TrafoSizeX + 1)>>2, where the variable log2TrafoSizeX is equal to log2TrafoSizeWidth for deriving the context of sig_coeff_x_prefix and is equal to log2TrafoSizeHeight for deriving the context of sig_coef_y_prefix.

[0155] Then, the video decoder 300 may use the following equation to determine the specific context (ctxInc) for the respective binary number:

[0156] ctxInc = (binIdx>>ctxShift)+ctxOffset

[0157] In this example, the first function for a 64-sample dimensional transform block is different from the second function, which is used to determine the respective context of each binary number in one or more binary numbers of the entropy-coded data of the syntax element indicating the position of the last significant coefficient for a 32-sample dimensional transform block. In the above example, the second function for a 32-sample dimensional transform block is as follows:

[0158] Set ctxOffset to be equal to 3*(log2TrafoSizeX - 2)+((log2TrafoSizeX - 1)>>2), and set ctxShift to be equal to (log2TrafoSizeX + 1)>>2, where the variable log2TrafoSizeX is equal to log2TrafoSizeWidth for deriving the context for sig_coeff_x_prefix and is equal to log2TrafoSizeHeight for deriving the context for sig_coef_y_prefix.

[0159] Again, the video decoder 300 can then use the following equation to determine the specific context (ctxInc) for the corresponding binary number:

[0160] ctxInc = (binIdx >> ctxShift)+ctxOffset

[0161] Of course, the video decoder 300 can be configured to use different functions for 32-sample dimension and 64-sample dimension transform blocks according to the techniques of the present disclosure, as long as the functions output the corresponding contexts such that the same context is not used for transform blocks of different sizes.

[0162] As can be seen from the above functions and equations, in order to use a function of the size of the transform block to determine the corresponding context for each binary number in one or more binary numbers of the entropy-coded data of the syntax element indicating the position of the last significant coefficient, the video decoder 300 can be configured to use a function of the size of the transform block and the color component index to determine the corresponding context offset (ctxOffset) and the corresponding context shift (ctxShift), and use the binary number index (binIdx) for the corresponding binary number, the corresponding context offset, and the corresponding context shift to determine the corresponding context for the corresponding binary number in one or more binary numbers.

[0163] Referring back to Table I, the syntax element entropy decoded by the video decoder 300 according to the techniques of the present disclosure is one of a first prefix syntax element (e.g., sig_coeff_x_prefix) indicating the X position of the position of the last significant coefficient or a second prefix syntax element (e.g., sig_coeff_y_prefix) indicating the Y position of the position of the last significant coefficient. Therefore, in order to decode the entropy-coded data of the syntax element indicating the position of the last significant coefficient using the determined corresponding context, the video decoder 300 can be configured to use the determined corresponding context to decode the entropy-coded data for both the first prefix syntax element and the second prefix syntax element.

[0164] Given that the sig_coeff_x_prefix and sig_coeff_y_prefix syntax elements are prefix syntax elements, the video decoder 300 may also be configured to decode the corresponding suffix syntax elements using a fixed-length decoding (e.g., the fixed binary part of Table I) corresponding to each of the sig_coeff_x_prefix and sig_coeff_y_prefix syntax elements, and to inverse-binarize the prefix syntax element and the first suffix syntax element to obtain the position (e.g., X or Y position) of the last significant coefficient in the transform block.

[0165] As described above, the video decoder 300 may then use the determined corresponding context to decode the entropy-coded data of the syntax element indicating the position of the last significant coefficient. For example, the video decoder 300 may decode the transform block based on the position of the last significant coefficient to obtain transform coefficients, apply an inverse transform to the transform coefficients to obtain a residual block, perform a prediction process (e.g., inter prediction or intra prediction) for the current block to obtain a prediction block, and add the residual block to the prediction block to obtain the decoded block of the video data.

[0166] The following is another example of context derivation. In the following example derivation, the video encoder 200 and the video decoder 300 may use one function for transform blocks with a dimension of 32 samples or less (if log2TrafoSizeX is less than or equal to 5), another function for transform blocks with a dimension of 64 samples (otherwise (if log2TrafoSizeX is equal to 6)), and yet another function for transform blocks with a dimension of 128 samples (otherwise (if log2TrafoSizeX is equal to 7)). Again, the parts in the following context derivation that help ensure that context indices are not inadvertently shared are shown in bold italic between the tags <add> and < / add>.

[0167] If cIdx is equal to 0, then the variables ctxOffset and ctxShift are derived as follows:

[0168] – <Add> If log2TrafoSizeX is less than or equal to 5, then set ctxOffset to be equal to 3 * (log2TrafoSizeX - 2) + ((log2TrafoSizeX - 1) >> 2), and set ctxShift to be equal to (log2TrafoSizeX + 1) >> 2, where the variable log2TrafoSizeX is equal to the log2TrafoSizeWidth used to derive the context for sig_coeff_x_prefix and is equal to the log2TrafoSizeHeight used to derive the context for sig_coef_y_prefix.

[0169] – <Add> Otherwise if (log2TrafoSizeX equals 6), then set ctxOffset to be equal to 3 * (log2TrafoSizeX - 2) + ((log2TrafoSizeX - 1) >> 2) + 2, and set ctxShift to be equal to (log2TrafoSizeX + 1) >> 2, where the variable log2TrafoSizeX is equal to the log2TrafoSizeWidth used to derive the context for sig_coeff_x_prefix and is equal to the log2TrafoSizeHeight used to derive the context for sig_coef_y_prefix.

[0170] – <Add> Otherwise if (log2TrafoSizeX equals 7), then set ctxOffset to be equal to 3 * (log2TrafoSizeX - 2) + ((log2TrafoSizeX - 1) >> 2) + 5, and set ctxShift to be equal to (log2TrafoSizeX + 1) >> 2, where the variable log2TrafoSizeX is equal to the log2TrafoSizeWidth used to derive the context for sig_coeff_x_prefix and is equal to the log2TrafoSizeHeight used to derive the context for sig_coef_y_prefix.

[0171] Otherwise (cIdx > 0), set ctxOffset equal to 25, and set ctxShift equal to log2TrafoSizeX – <Added>2 – log2(TrafoSizeX >> 4), where the variable TrafoSizeX is equal to TrafoSizeWidth used to derive the context for sig_coeff_x_prefix and is equal to TrafoSizeHeight used to derive the context for sig_coef_y_prefix.< / Added>

[0172] Thus, in another example of the present disclosure, the transform block for the current block is a 128-sample dimension transform block. In this example, to determine the respective context of each binary number in the entropy-coded data of the syntax element indicating the position of the last significant coefficient using a function of the size of the transform block, the video decoder 300 may be configured to use a first function to determine the respective context of each binary number in the entropy-coded data of the syntax element indicating the position of the last significant coefficient for a 128-sample dimension transform block. In this example, the first function is different from the second function, which is used to determine the respective context of each binary number in the entropy-coded data of the syntax element indicating the position of the last significant coefficient for a 64-sample dimension transform block, and the first function is different from the third function, which is used to determine the respective context of each binary number in the entropy-coded data of the syntax element indicating the position of the last significant coefficient for a 32-sample dimension transform block.

[0173] In view of the above, in one example of the present disclosure, the video decoder 300 may be configured to: receive the entropy-coded data for the current block of video data, where the entropy-coded data includes the entropy-coded data for the syntax element indicating the position of the last significant coefficient in the transform block of the current block; use a function of the size of the transform block to determine the context of one or more binary numbers in the entropy-coded data of the syntax element indicating the position of the last significant coefficient, where the function outputs a context such that the same context is not used for transform blocks of different sizes; and use the determined context to decode the entropy-coded data for the syntax element indicating the position of the last significant coefficient.

[0174] In one example, the function is also based on the binary number index and the color component index.

[0175] Similarly, the video encoder 200 can be configured to: determine a syntax element indicating the position of the last significant coefficient in the transform block of the current block of video data; binarize the syntax element into one or more binary numbers; use a function of the size of the transform block to determine a context of the one or more binary numbers of the syntax element indicating the position of the last significant coefficient, wherein the function outputs a context such that the same context is not used for transform blocks of different sizes; and entropy code the one or more binary numbers of the syntax element indicating the position of the last significant coefficient using the determined context.

[0176] In one example, the function is also based on a binary number index and a color component index.

[0177] Figure 4 is a flowchart illustrating an example method for encoding a current block. The current block can include a current CU. Although described with respect to the video encoder 200 ( Figure 1 and 2 ), it should be understood that other devices can be configured to perform methods similar to the Figure 4 method.

[0178] In this example, the video encoder 200 initially predicts the current block (350). For example, the video encoder 200 can form a prediction block for the current block. Then, the video encoder 200 can calculate a residual block (352) for the current block. To calculate the residual block, the video encoder 200 can calculate the difference between the original unencoded block and the prediction block for the current block. Then, the video encoder 200 can transform and quantize the transform coefficients of the residual block (354). Next, the video encoder 200 can scan the quantized transform coefficients of the residual block (356). During or after the scan, the video encoder 200 can entropy code the coefficients and other syntax elements (358). For example, the video encoder 200 can use CAVLC or CABAC to encode the coefficients. As an example, the video encoder 200 can use the example techniques described in the present disclosure to determine a context of the one or more binary numbers of the syntax element indicating the position of the last significant coefficient. Figure 5 Additional details are described in

[0179] Figure 5 is a flowchart illustrating an example entropy coding method. Figure 5 More specifically illustrates Figure 4Aspects of process 358. The video encoder 200 may be configured to: determine a syntax element (500) indicating the position of the last significant coefficient in a transform block of a current block of video data, and binarize the syntax element into one or more binary numbers (502). The video encoder 200 may also be configured to: determine, using a function of the size of the transform block, a respective context for each of the one or more binary numbers of the syntax element indicating the position of the last significant coefficient, where the function outputs a context such that the same context is not used for transform blocks of different sizes (504). The video encoder 200 may then entropy code the one or more binary numbers of the syntax element indicating the position of the last significant coefficient using the determined respective contexts (506).

[0180] Figure 6 is a flow chart illustrating an example method for decoding a current block of video data. The current block may include a current CU. Although described with respect to video decoder 300 ( Figure 1 and 3 ), it should be understood that other devices may be configured to perform methods similar to the Figure 6 method.

[0181] The video decoder 300 may receive entropy-coded data for the current block (such as entropy-coded prediction information and entropy-coded data for the coefficients of a residual block corresponding to the current block) (370). The video decoder 300 may entropy decode the entropy-coded data to determine prediction information for the current block and reproduce the coefficients of the residual block (372). As an example, the video decoder 300 may use the example techniques described in this disclosure to determine the context of one or more binary numbers of a syntax element indicating the position of the last significant coefficient.

[0182] The video decoder 300 may predict the current block (374), e.g., calculate a prediction block for the current block using an intra or inter prediction mode indicated by the prediction information for the current block. Then, the video decoder 300 may perform an inverse scan on the reproduced coefficients (376) to create a block of quantized transform coefficients. Then, the video decoder 300 may inverse quantize and inverse transform the coefficients to produce a residual block (378). Finally, the video decoder 300 may decode the current block by combining the prediction block and the residual block (380).

[0183] Figure 7 is a flow chart illustrating an example entropy decoding method. Figure 7 More specifically illustrates Figure 6 aspects of process 372.

[0184] For example, video decoder 300 may be configured to: receive entropy-coded data for a current block of video data, where the entropy-coded data includes entropy-coded data for a syntax element that indicates the position of the last significant coefficient in a transform block of the current block (700). Video decoder 300 may use a function of the size of the transform block to determine a respective context for each binary number in one or more binary numbers of the entropy-coded data for the syntax element that indicates the position of the last significant coefficient, where the function outputs the respective context such that the same context is not used for transform blocks of different sizes (702). Then, video decoder 300 may use the determined respective context to decode the entropy-coded data for the syntax element that indicates the position of the last significant coefficient (704).

[0185] The following are additional illustrative examples of the present disclosure.

[0186] Example 1 - A method for decoding video data, the method comprising: receiving entropy-coded data for a current block of video data, where the entropy-coded data includes entropy-coded data for a syntax element that indicates the position of the last significant coefficient in a transform block of the current block; using a function of the size of the transform block to determine a context for one or more binary numbers of the syntax element that indicates the position of the last significant coefficient, where the function outputs the context such that the same context is not used for transform blocks of different sizes; and using the determined context to decode the entropy-coded data for the syntax element that indicates the position of the last significant coefficient.

[0187] Example 2 - The method according to Example 1, where the function is further based on a binary number index and a color component index.

[0188] Example 3 - A method for encoding video data, the method comprising: determining a syntax element that indicates the position of the last significant coefficient in a transform block of a current block of video data; binarizing the syntax element into one or more binary numbers; using a function of the size of the transform block to determine a context for the one or more binary numbers of the syntax element that indicates the position of the last significant coefficient, where the function outputs the context such that the same context is not used for transform blocks of different sizes; and using the determined context to entropy-encode the one or more binary numbers of the syntax element that indicates the position of the last significant coefficient.

[0189] Example 4 - The method according to Example 3, where the function is further based on a binary number index and a color component index.

[0190] Example 5 - An apparatus for decoding video data, the apparatus including one or more units configured to perform the method according to any one of Examples 1 - 4.

[0191] Example 6 - The apparatus according to Example 5, wherein the one or more units include one or more processors implemented in circuitry.

[0192] Example 7 - The apparatus according to any one of Examples 5 and 6, further comprising: a memory for storing the video data.

[0193] Example 8 - The apparatus according to any one of Examples 5 - 7, further comprising: a display configured to display the decoded video data.

[0194] Example 9 - The apparatus according to any one of Examples 5 - 8, wherein the apparatus includes one or more of a camera, a computer, a mobile device, a broadcast receiver device, or a set - top box.

[0195] Example 10 - The apparatus according to any one of Examples 5 - 9, wherein the apparatus includes a video decoder.

[0196] Example 11 - The apparatus according to any one of Examples 5 - 10, wherein the apparatus includes a video encoder.

[0197] Example 12 - A computer - readable storage medium having instructions stored thereon, the instructions when executed causing one or more processors to perform the method according to any one of Examples 1 - 4.

[0198] It should be recognized that, depending on the example, certain actions or events of any of the techniques described herein may be performed in a different order, may be added, combined, or entirely omitted (e.g., not all described actions or events are necessary for implementing the technique). Additionally, in certain examples, actions or events may be performed concurrently rather than sequentially, for example, by multithreading, interrupt processing, or multiple processors.

[0199] In one or more examples, the described functionality may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functionality may be stored on or transmitted via a computer-readable medium as one or more instructions or code and executed by a hardware-based processing unit. The computer-readable medium may include a computer-readable storage medium corresponding to a tangible medium such as a data storage medium or a communication medium including any medium that facilitates transfer of a computer program from one place to another, for example, according to a communication protocol. In this manner, the computer-readable medium generally may correspond to (1) a non-transitory tangible computer-readable storage medium or (2) a communication medium such as a signal or carrier wave. The data storage medium may be any available medium that can be accessed by one or more computers or one or more processors to obtain instructions, code, and / or data structures for implementing the techniques described in this disclosure. A computer program product may include a computer-readable medium.

[0200] By way of example and not limitation, such computer-readable storage media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, flash memory, or any other medium 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. Additionally, any connection is properly termed a computer-readable medium. For example, if instructions are transmitted using coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave from a website, server, or other remote source, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of the medium. However, it should be understood that computer-readable storage media and data storage media do not include connections, carrier waves, signals, or other transient media, but instead are directed to non-transitory tangible storage media. As used herein, disk and disc include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk, and Blu-ray disc, where disks typically reproduce data magnetically and discs reproduce data optically using lasers. Combinations of the above should also be included within the scope of computer-readable media.

[0201] The instructions can 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 equivalent integrated or discrete logic circuitry. Thus, as used herein, the terms "processor" and "processing circuitry" can refer to any one of the foregoing structures or any other structure suitable for implementing the techniques described herein. Additionally, in some aspects, the functionality described herein can be provided within dedicated hardware and / or software modules configured for encoding and decoding, or incorporated into a combined codec. Further, the techniques can be implemented entirely within one or more circuits or logic elements.

[0202] The techniques of the present disclosure can be implemented in a variety of devices or apparatuses, including wireless handsets, integrated circuits (ICs) or a group of ICs (e.g., a chipset). Various components, modules, or units are described in the present disclosure to emphasize functional aspects of devices configured to perform the disclosed techniques, but need not necessarily be implemented by different hardware units. Rather, as described above, the various units can be combined in a 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.

[0203] Various examples have been described. These and other examples are within the scope of the appended claims.

Claims

1. A method for decoding video data, the method comprising: Receiving entropy - coded data for a current block of video data, wherein the entropy - coded data includes entropy - coded data for a syntax element indicating a position of a last significant coefficient in a transform block of the current block; Using a function of the size of the transform block to determine a respective context for each binary number of one or more binary numbers of the entropy - coded data for the syntax element indicating the position of the last significant coefficient, wherein the function outputs the respective context such that the same context is not used for transform blocks of different sizes, wherein: When a variable (log2TrafoSize) of the base - 2 logarithm of a specified transform block size (TrafoSize) is greater than 5, the function includes setting a context offset (ctxOffset) to be equal to 3*(log2TrafoSize - 2)+((log2TrafoSize - 1)>>2)+((TrafoSize>>6)<<1)+(TrafoSize>>7); and Using the determined respective context to decode the entropy - coded data for the syntax element indicating the position of the last significant coefficient.

2. The method according to claim 1, wherein The transform block for the current block is a 64 - sample - dimension transform block, and wherein the function includes linear operations and non - linear operations.

3. The method according to claim 2, wherein, The non - linear operation includes a size - dependent offset having bit - shifting and clipping.

4. The method according to claim 1, wherein The transform block for the current block is a 64 - sample - dimension transform block, and wherein using the function of the size of the transform block to determine the respective context for each binary number of one or more binary numbers of the entropy - coded data for the syntax element indicating the position of the last significant coefficient includes: Using a first function for the 64 - sample - dimension transform block to determine the respective context for each binary number of one or more binary numbers of the entropy - coded data for the syntax element indicating the position of the last significant coefficient, wherein the first function is different from a second function that is used for a 32 - sample - dimension transform block to determine the respective context for each binary number of one or more binary numbers of the entropy - coded data for the syntax element indicating the position of the last significant coefficient.

5. The method according to claim 1, wherein Using the function of the size of the transform block to determine the respective context for each binary number of one or more binary numbers of the entropy - coded data for the syntax element indicating the position of the last significant coefficient includes: Using the function of the size of the transform block and a color - component index to determine a respective context offset and a respective context shift; and Using a binary - number index for a respective binary number of the one or more binary numbers, the respective context offset, and the respective context shift to determine the respective context for the respective binary number.

6. The method according to claim 1, wherein The syntax element is one of a first prefix syntax element indicating an X position of the location of the last significant coefficient or a second prefix syntax element indicating a Y position of the location of the last significant coefficient, and wherein decoding the entropy-coded data for the syntax element indicating the location of the last significant coefficient using the determined respective context includes: Decoding the entropy-coded data for the first prefix syntax element or the second prefix syntax element using the determined respective context.

7. The method according to claim 6, further comprising: Decoding a first suffix syntax element using fixed-length decoding; And Inverse binaryzing the first prefix syntax element and the first suffix syntax element to obtain the location of the last significant coefficient.

8. The method according to claim 1, wherein, The transform block for the current block is a 128-sample dimension transform block, and wherein determining the respective context for each binary number of the one or more binary numbers of the entropy-coded data for the syntax element indicating the location of the last significant coefficient using the function of the size of the transform block includes: Using a first function for the 128-sample dimension transform block to determine the respective context for each binary number of the one or more binary numbers of the entropy-coded data for the syntax element indicating the location of the last significant coefficient, wherein the first function is different from a second function which is used for a 64-sample dimension transform block to determine the respective context for each binary number of the one or more binary numbers of the entropy-coded data for the syntax element indicating the location of the last significant coefficient, and wherein the first function is different from a third function which is used for a 32-sample dimension transform block to determine the respective context for each binary number of the one or more binary numbers of the entropy-coded data for the syntax element indicating the location of the last significant coefficient.

9. The method according to claim 1, further comprising: Decoding the transform block based on the location of the last significant coefficient to obtain transform coefficients; Applying an inverse transform to the transform coefficients to obtain a residual block; Performing a prediction process for the current block to obtain a prediction block; And Adding the residual block to the prediction block to obtain a decoded block of video data.

10. The method according to claim 9, further comprising: Displaying a picture including the decoded block of video data.

11. The method according to claim 1, wherein: When the variable is less than or equal to 5, the function includes setting the context offset to be equal to 3*(log2TrafoSize - 2)+((log2TrafoSize - 1)>>2).

12. An apparatus configured to decode video data, the apparatus comprising: A memory configured to store a current block of video data; And One or more processors in communication with the memory, the one or more processors being configured to: Receive the entropy-coded data for the current block of video data, wherein the entropy-coded data includes entropy-coded data for a syntax element indicating the position of the last significant coefficient in the transform block of the current block; Use a function of the size of the transform block to determine a respective context for each binary number among one or more binary numbers of the entropy-coded data for the syntax element indicating the position of the last significant coefficient, wherein the function outputs the respective context such that the same context is not used for transform blocks of different sizes, wherein: When the variable (log2TrafoSize) of the base-2 logarithm of the specified transform block size (TrafoSize) is greater than 5, the function includes setting a context offset (ctxOffset) to be equal to 3*(log2TrafoSize - 2)+((log2TrafoSize - 1)>>2)+((TrafoSize>>6)<<1)+(TrafoSize>>7); and Decode the entropy-coded data for the syntax element indicating the position of the last significant coefficient using the determined respective context.

13. The device according to claim 12, wherein, The transform block for the current block is a 64-sample dimensional transform block, and wherein the function includes linear operations and non-linear operations.

14. The device according to claim 13, wherein, The non-linear operation includes a size-dependent offset with bit-shifting and clipping.

15. The apparatus according to claim 12, wherein, The transform block for the current block is a 64-sample dimensional transform block, and wherein, in order to use the function of the size of the transform block to determine the respective context for each binary number among one or more binary numbers of the entropy-coded data for the syntax element indicating the position of the last significant coefficient, the one or more processors are further configured to: Use a first function for the 64-sample dimensional transform block to determine the respective context for each binary number among one or more binary numbers of the entropy-coded data for the syntax element indicating the position of the last significant coefficient, wherein the first function is different from a second function that is used for a 32-sample dimensional transform block to determine the respective context for each binary number among one or more binary numbers of the entropy-coded data for the syntax element indicating the position of the last significant coefficient.

16. The device according to claim 12, wherein In order to use the function of the size of the transform block to determine the respective context for each binary number among one or more binary numbers of the entropy-coded data for the syntax element indicating the position of the last significant coefficient, the one or more processors are further configured to: Use the function of the size of the transform block and a color component index to determine a respective context offset and a respective context shift; and Use a binary number index for the respective binary number among the one or more binary numbers, the respective context offset, and the respective context shift to determine the respective context for the respective binary number.

17. The apparatus according to claim 12, wherein The syntax element is one of a first prefix syntax element indicating an X position of the location of the last significant coefficient or a second prefix syntax element indicating a Y position of the location of the last significant coefficient, and wherein, to decode the entropy-coded data of the syntax element indicating the location of the last significant coefficient using the determined respective context, the one or more processors are further configured to: Decode the entropy-coded data for the first prefix syntax element or the second prefix syntax element using the determined respective context.

18. The apparatus according to claim 17, wherein, The one or more processors are further configured to: Decode a first suffix syntax element using fixed-length decoding; and Inverse binary transform the first prefix syntax element and the first suffix syntax element to obtain the location of the last significant coefficient.

19. The device according to claim 12, wherein, The transform block for the current block is a 128-sample dimensional transform block, and wherein, to determine the respective context of each binary number of the one or more binary numbers of the entropy-coded data of the syntax element indicating the location of the last significant coefficient using the function of the size of the transform block, the one or more processors are further configured to: Use a first function for the 128-sample dimensional transform block to determine the respective context of each binary number of the one or more binary numbers of the entropy-coded data of the syntax element indicating the location of the last significant coefficient, wherein the first function is different from a second function that is used for a 64-sample dimensional transform block to determine the respective context of each binary number of the one or more binary numbers of the entropy-coded data of the syntax element indicating the location of the last significant coefficient, and wherein the first function is different from a third function that is used for a 32-sample dimensional transform block to determine the respective context of each binary number of the one or more binary numbers of the entropy-coded data of the syntax element indicating the location of the last significant coefficient.

20. The apparatus according to claim 12, wherein, The one or more processors are further configured to: Decode the transform block based on the location of the last significant coefficient to obtain transform coefficients; Apply an inverse transform to the transform coefficients to obtain a residual block; Perform a prediction process for the current block to obtain a prediction block; And Add the residual block to the prediction block to obtain a decoded block of video data.

21. The apparatus according to claim 20, further comprising: A display configured to display a picture including the decoded block of video data.

22. The apparatus according to claim 12, wherein The apparatus is a wireless communication device.

23. The apparatus according to claim 12, wherein: When the variable is less than or equal to 5, the function includes setting the context offset to be equal to 3*(log2TrafoSize - 2)+((log2TrafoSize - 1)>>2).

24. A non - transitory computer - readable storage medium storing instructions that, when executed, cause one or more processors of a device configured to decode video data to perform the following operations: Receive the entropy-coded data for the current block of video data, wherein, The entropy - coded data includes entropy - coded data for a syntax element indicating the position of the last significant coefficient in the transform block of the current block; Using a function of the size of the transform block, determine a respective context for each binary number among the one or more binary numbers of the entropy - coded data for the syntax element indicating the position of the last significant coefficient, wherein the function outputs the respective context such that the same context is not used for transform blocks of different sizes, where: When the variable (log2TrafoSize) of the base - 2 logarithm of the specified transform block size (TrafoSize) is greater than 5, the function includes setting the context offset (ctxOffset) to be equal to 3*(log2TrafoSize - 2)+((log2TrafoSize - 1)>>2)+((TrafoSize>>6)<<1)+(TrafoSize>>7); and Decode the entropy - coded data for the syntax element indicating the position of the last significant coefficient using the determined respective context.

25. The non-transitory computer-readable storage medium according to claim 24, wherein, The transform block for the current block is a 64 - sample - dimension transform block, and wherein the function includes linear operations and non - linear operations.

26. The non-transitory computer-readable storage medium according to claim 25, wherein, The non - linear operation includes a size - dependent offset with bit - shifting and clipping.

27. The non-transitory computer-readable storage medium according to claim 24, wherein, The transform block for the current block is a 64 - sample - dimension transform block, and wherein, to use the function of the size of the transform block to determine the respective context for each binary number among the one or more binary numbers of the entropy - coded data for the syntax element indicating the position of the last significant coefficient, the instructions further cause the one or more processors to perform the following operations: Use a first function for the 64 - sample - dimension transform block to determine the respective context for each binary number among the one or more binary numbers of the entropy - coded data for the syntax element indicating the position of the last significant coefficient, wherein the first function is different from a second function that is used for a 32 - sample - dimension transform block to determine the respective context for each binary number among the one or more binary numbers of the entropy - coded data for the syntax element indicating the position of the last significant coefficient.

28. The non-transitory computer-readable storage medium according to claim 24, wherein, To use the function of the size of the transform block to determine the respective context for each binary number among the one or more binary numbers of the entropy - coded data for the syntax element indicating the position of the last significant coefficient, the instructions further cause the one or more processors to perform the following operations: Use the function of the size of the transform block and a color - component index to determine a respective context offset and a respective context shift; and Determine the corresponding context for the corresponding binary number using the binary number index for the corresponding binary number among the one or more binary numbers, the corresponding context offset, and the corresponding context shift.

29. The non-transitory computer-readable storage medium according to claim 24, wherein, The syntax element is one of a first prefix syntax element indicating an X position of the position of the last significant coefficient or a second prefix syntax element indicating a Y position of the position of the last significant coefficient, and wherein, to decode the entropy-coded data for the syntax element indicating the position of the last significant coefficient using the determined corresponding context, the instruction further causes the one or more processors to perform the following operations: Decode the entropy-coded data for the first prefix syntax element or the second prefix syntax element using the determined corresponding context.

30. The non-transitory computer-readable storage medium according to claim 29, wherein, The instruction further causes the one or more processors to perform the following operations: Decode a first suffix syntax element using fixed-length decoding; and Inverse-binarize the first prefix syntax element and the first suffix syntax element to obtain the position of the last significant coefficient.

31. The non-transitory computer-readable storage medium according to claim 24, wherein, The transform block for the current block is a 128-sample dimension transform block, and wherein, to determine the corresponding context for each binary number among the one or more binary numbers of the entropy-coded data for the syntax element indicating the position of the last significant coefficient using the function of the size of the transform block, the instruction further causes the one or more processors to perform the following operations: Use a first function for the 128-sample dimension transform block to determine the corresponding context for each binary number among the one or more binary numbers of the entropy-coded data for the syntax element indicating the position of the last significant coefficient, wherein the first function is different from a second function that is used for a 64-sample dimension transform block to determine the corresponding context for each binary number among the one or more binary numbers of the entropy-coded data for the syntax element indicating the position of the last significant coefficient, and wherein the first function is different from a third function that is used for a 32-sample dimension transform block to determine the corresponding context for each binary number among the one or more binary numbers of the entropy-coded data for the syntax element indicating the position of the last significant coefficient.

32. The non-transitory computer-readable storage medium according to claim 24, wherein, The instruction further causes the one or more processors to perform the following operations: Decode the transform block based on the position of the last significant coefficient to obtain transform coefficients; Apply an inverse transform to the transform coefficients to obtain a residual block; Perform a prediction process for the current block to obtain a prediction block; And Add the residual block to the prediction block to obtain a decoded block of video data.

33. The non-transitory computer-readable storage medium according to claim 24, wherein: When the said variable is less than or equal to 5, the said function includes setting the said context offset to be equal to 3*(log2TrafoSize - 2)+((log2TrafoSize - 1)>>2).

Citation Information

Patent Citations

  • Context optimization for last significant coefficient position coding

    CN104025457A