Context Modeling for Code Prediction for Video Coding

JP2024512503A5Active Publication Date: 2025-03-06QUALCOMM INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2023557415
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2022-03-24
Filing Date
2022-03-25
Publication Date
2025-03-06
Estimated Expiration
2042-03-25

AI Technical Summary

Technical Problem

Existing video coding techniques do not efficiently utilize context-based coding for sign prediction syntax elements, leading to suboptimal compression efficiency due to reliance on transform coefficient magnitude without considering position and coding mode.

Method used

Determine context for coding sign prediction syntax elements based on the location of transform coefficients within a block and the coding mode used, improving coding efficiency by using position-dependent and mode-specific contexts.

Benefits of technology

Enhances video coding efficiency by optimizing context selection for sign prediction, reducing redundancy and improving compression performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

A video coder may code a sign prediction syntax element that indicates whether a sign prediction hypothesis is correct for a transform coefficient. The video coder may code the sign prediction syntax element using a context-based coding process. The video coder may determine a context for coding the sign prediction syntax element based on a position of the transform coefficient in a block of video data. The context may be further based on a coding mode used to code the block.
Need to check novelty before this filing date? Find Prior Art

Description

Claiming priority

[0001]

[0001] This application claims priority to U.S. Patent Application No. 17 / 656,319, filed March 24, 2022, and U.S. Provisional Patent Application No. 63 / 167,507, filed March 29, 2021, the entire contents of each of which are incorporated herein by reference. U.S. Patent Application No. 17 / 656,319, filed March 24, 2022, claims the benefit of U.S. Provisional Patent Application No. 63 / 167,507, filed March 29, 2021. [Technical field]

[0002]

[0002] This disclosure relates to video encoding and decoding. [Background technology]

[0003] Digital video capabilities may be incorporated into a wide range of devices, including digital televisions, digital direct broadcast systems, wireless broadcast systems, personal digital assistants (PDAs), laptop or desktop computers, tablet computers, e-book readers, digital cameras, digital recording devices, digital media players, video gaming devices, video game consoles, cellular or satellite radio telephones, so-called "smartphones," video teleconferencing devices, video streaming devices, etc. Digital video devices implement video coding techniques such as those described in standards defined by MPEG-2, MPEG-4, ITU-T H.263, ITU-T H.264 / MPEG-4, Part 10, Advanced Video Coding (AVC), ITU-T H.265 / High Efficiency Video Coding (HEVC), ITU-T H.266 / Generic Video Coding (VVC), and extensions to such standards, as well as proprietary video codecs / formats such as AOMedia Video1 (AV1) developed by the Alliance for Open Media. By implementing such video coding techniques, video devices may more efficiently transmit, receive, encode, decode, and / or store digital video information.

[0004]

[0004] Video coding techniques include spatial (intra-picture) prediction and / or temporal (inter-picture) prediction to reduce or remove redundancy inherent in video sequences. In block-based video coding, a video slice (e.g., a video picture or a portion of a video picture) may be partitioned into video blocks, which may 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 with respect to reference samples in neighboring blocks in the same picture. Video blocks in an inter-coded (P or B) slice of a picture may use spatial prediction with respect to reference samples in neighboring blocks in the same picture or temporal prediction with respect to reference samples in other reference pictures. A picture may be referred to as a frame, and a reference picture may be referred to as a reference frame. Summary of the Invention

[0005]

[0005] Generally, this disclosure describes techniques for sign prediction in video coding. In particular, this disclosure describes techniques for determining a context for coding a sign prediction syntax element using context-based coding. A sign prediction syntax element is a syntax element that indicates whether a sign prediction hypothesis for a transform coefficient matches the actual sign value of the transform coefficient. The sign prediction hypothesis is a prediction as to whether the sign of a particular transform coefficient has a positive or negative value. A video coder may determine a context (e.g., a probability model) for coding the sign prediction using context-based coding.

[0006] In particular, this disclosure describes techniques in which a video coder is configured to determine a context based on one or more of a position of a transform coefficient in a block and / or a coding mode (e.g., inter-coding or intra-coding) used to code the block. Because characteristics (e.g., magnitude and sign) of a transform coefficient may differ based on the position within the block and / or the coding mode used to generate the transform coefficient, using the position and / or the coding mode of the transform coefficient to determine a context for coding a sign prediction may improve coding efficiency.

[0007]

[0007] In one example, this disclosure describes a method for decoding video data, the method comprising: determining a context for decoding a code prediction syntax element for a transform coefficient based on a position of the transform coefficient in a block of video data, where the code prediction syntax element indicates whether a code prediction hypothesis is correct for the transform coefficient; and decoding the code prediction syntax element using the context.

[0008]

[0008] In another example, the disclosure describes an apparatus configured to decode video data, the apparatus comprising: a memory configured to store a block of video data; and one or more processors implemented in circuitry and in communication with the memory, the one or more processors configured to: determine a context for decoding a sign prediction syntax element for a transform coefficient based on a position of the transform coefficient in the block of video data, where the sign prediction syntax element indicates whether a sign prediction hypothesis is correct for the transform coefficient; and decode the sign prediction syntax element using the context.

[0009]

[0009] In another example, this disclosure describes an apparatus configured to decode video data, the apparatus comprising: means for determining a context for decoding a sign prediction syntax element for a transform coefficient based on a position of the transform coefficient in a block of the video data, where the sign prediction syntax element indicates whether a sign prediction hypothesis is correct for the transform coefficient; and means for decoding the sign prediction syntax element using the context.

[0010]

[0010] In another example, this disclosure describes a non-transitory computer-readable storage medium storing instructions that, when executed, cause one or more processors configured to decode video data to: determine a context for decoding a sign prediction syntax element for a transform coefficient based on a position of the transform coefficient in a block of video data, where the sign prediction syntax element indicates whether a sign prediction hypothesis is correct for the transform coefficient; and decode the sign prediction syntax element using the context.

[0011]

[0011] In another example, the disclosure describes an apparatus configured to encode video data, the apparatus comprising: a memory configured to store a block of video data; and one or more processors implemented in circuitry and in communication with the memory, the one or more processors configured to: determine a context for encoding a sign prediction syntax element for a transform coefficient based on a position of the transform coefficient in the block of video data, where the sign prediction syntax element indicates whether a sign prediction hypothesis is correct for the transform coefficient; and encode the sign prediction syntax element using the context.

[0012] The details of one or more examples are set forth in the accompanying drawings and the description below. Other features, objects, and advantages will become apparent from the description, drawings, and claims. [Brief description of the drawings]

[0013] [Figure 1]

[0013] FIG. 1 is a block diagram illustrating an example video encoding and decoding system in which the techniques of this disclosure may be implemented. [Diagram 2]

[0014] 1 is a conceptual diagram illustrating an example transform block decomposition in accordance with techniques of this disclosure. [Diagram 3]

[0015] 1 is a conceptual diagram illustrating an example discontinuity measure in symbol prediction, in accordance with the techniques of this disclosure. [Figure 4]

[0016] 4 is a conceptual diagram illustrating example locations of transform coefficients in accordance with the techniques of this disclosure. [Diagram 5]

[0017] 1 is a block diagram illustrating an example video encoder that may implement the techniques of this disclosure. [Figure 6]

[0018] 1 is a block diagram illustrating an example video decoder that may implement the techniques of this disclosure. [Figure 7]

[0019] 1 is a flowchart illustrating an example method for encoding a current block in accordance with techniques of this disclosure. [Figure 8]

[0020] 6 is a flowchart illustrating an example method for decoding a current block in accordance with techniques of this disclosure. [Figure 9]

[0021] 6 is a flowchart illustrating another example method for encoding a current block in accordance with techniques of this disclosure. [Figure 10]

[0022] 6 is a flowchart illustrating another example method for decoding a current block in accordance with techniques of this disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0014]

[0023] A video encoder may code a block of video data using a coding mode, such as inter prediction or intra prediction. In some examples, the video encoder may form a residual block of video data that represents the difference between a block being coded and a predictive block. The residual block may then be transformed to the frequency domain to create a block of transform coefficients. The transform coefficients may be quantized to integer values. Each transform coefficient is represented by a magnitude (e.g., absolute value) and a sign (e.g., positive or negative).

[0015]

[0024] In some examples, a video encoder may be configured to perform sign prediction for a certain number of transform coefficients. For example, if two signs are predicted, there may be four possible combinations, or sign prediction hypotheses, namely (+,+), (+,-), (-,+), (-,-). For all four combinations, a cost function is calculated, and the combination (e.g., sign prediction hypothesis) with the smallest cost is selected as the sign predictor combination. A video decoder may perform the inverse process.

[0016]

[0025] For transform coefficients for which sign prediction is performed, instead of bypass signaling, a video encoder may code and signal a context-coded bin (e.g., a sign prediction syntax element) to indicate whether the actual transform coefficient sign is equal to the hypothesis. In previous techniques, the context used to code the sign prediction syntax element was dependent on the transform coefficient magnitude. This disclosure describes different techniques for determining a context for coding the sign prediction syntax element. In particular, a video coder may determine a context based on one or more of a position of a transform coefficient in a block and / or a coding mode used to code the block. Because characteristics (e.g., magnitude and sign) of a transform coefficient may differ based on the position within the block and the coding mode used to generate the transform coefficient, using the position and / or coding mode of the transform coefficient to determine a context for coding the sign prediction may improve coding efficiency.

[0017]

[0026] 1 is a block diagram illustrating an example video encoding and decoding system 100 that may implement the techniques of this disclosure. The techniques of this disclosure are generally directed to coding (encoding and / or decoding) video data. Generally, video data includes any data for processing video. Thus, video data may include raw uncoded video, coded video, decoded (e.g., reconstructed) video, and video metadata, such as signaling data.

[0018]

[0027] 1, system 100 includes a source device 102 that provides encoded video data to be decoded and displayed by a destination device 116, in this example. In particular, source device 102 provides the video data to destination device 116 via a computer-readable medium 110. Source device 102 and destination device 116 may comprise any of a wide range of devices, including desktop computers, notebook (i.e., laptop) computers, mobile devices, tablet computers, set-top boxes, telephone handsets such as smartphones, televisions, cameras, display devices, digital media players, video gaming consoles, video streaming devices, broadcast receiver devices, and the like. In some cases, source device 102 and destination device 116 may be equipped for wireless communication and thus may be referred to as wireless communication devices.

[0019]

[0028] In the example of FIG. 1, source device 102 includes a video source 104, a memory 106, a video encoder 200, and an output interface 108. Destination device 116 includes an input interface 122, a video decoder 300, a memory 120, and a display device 118. According to this disclosure, the video encoder 200 of source device 102 and the video decoder 300 of destination device 116 may be configured to apply techniques for context modeling for code prediction in video coding. 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, the source device and destination device 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 rather than including an integrated display device.

[0020]

[0029] The system 100 shown in FIG. 1 is only an example. In general, any digital video encoding and / or decoding device may implement techniques for context modeling for code prediction in video coding. The source device 102 and the destination device 116 are only examples of coding devices, such that the source device 102 generates coded video data for transmission to the destination device 116. This disclosure refers to a "coding" device as a device that performs coding (encoding and / or decoding) of data. Thus, the video encoder 200 and the video decoder 300 represent examples of coding devices, in particular video encoders and video decoders, respectively. In some examples, the source device 102 and the destination device 116 may operate substantially symmetrically, such that each of the source device 102 and the destination device 116 includes video encoding and video decoding components. Thus, the system 100 may support one-way or two-way video transmission between the source device 102 and the destination device 116, for example, video streaming, video playback, video broadcasting, or video telephony.

[0021]

[0030] Generally, video source 104 represents a source of video data (i.e., raw, unencoded video data) and provides a continuous series of pictures (also called “frames”) of the video data to video encoder 200, which encodes the data for the pictures. Video source 104 of source device 102 may include a video capture device, such as a video camera, a video archive containing previously captured raw video, and / or a video feed interface for receiving video from a video content provider. As a further alternative, video source 104 may generate computer graphics-based data as source video, or a combination of live, archived, and computer-generated video. In each case, video encoder 200 encodes the captured, pre-captured, or computer-generated video data. Video encoder 200 may rearrange the pictures from a receiving order (sometimes called a “display order”) to a coding order for coding. Video encoder 200 may generate a bitstream including the encoded video data. The source device 102 may then output the encoded video data onto a computer-readable medium 110 via an output interface 108, for receipt and / or retrieval by, for example, an input interface 122 of a destination device 116.

[0022]

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

[0023]

[0032] The computer-readable medium 110 may represent any type of medium or device capable of transporting encoded video data from the source device 102 to the destination device 116. In one example, the computer-readable medium 110 represents a communication medium for enabling the source device 102 to transmit the encoded video data directly to the destination device 116 in real time, for example, via a radio frequency network or a computer-based network. The output interface 108 may modulate a transmission signal including the encoded video data, and the input interface 122 may demodulate a received transmission signal according to a communication standard such as a wireless communication protocol. The communication medium may comprise any wireless or wired communication medium, such as a radio frequency (RF) spectrum or one or more physical transmission lines. The communication medium may form part of a packet-based network, such as a local area network, a wide area network, or a global network such as the Internet. The communication medium may include routers, switches, base stations, or any other equipment that may be useful in facilitating communication from the source device 102 to the destination device 116.

[0024]

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

[0025]

[0034] In some examples, source device 102 may output the encoded video data to a file server 114 or another intermediate storage device, which may store the encoded video data generated by source device 102. Destination device 116 may access the stored video data from file server 114 via streaming or download.

[0026]

[0035] The file server 114 may be any type of server device capable of storing encoded video data and transmitting the encoded video data to the destination device 116. The file server 114 may represent a web server (e.g., for a website), a server configured to provide a file transfer protocol service (such as File Transfer Protocol (FTP) or File Delivery over Unidirectional Transport (FLUTE) protocol), a content delivery network (CDN) device, a Hypertext Transfer Protocol (HTTP) server, a Multimedia Broadcast Multicast Service (MBMS) or enhanced MBMS (eMBMS) server, and / or a network attached storage (NAS) device. The file server 114 may additionally or alternatively implement one or more HTTP streaming protocols, such as Dynamic Adaptive Streaming over HTTP (DASH), HTTP Live Streaming (HLS), Real Time Streaming Protocol (RTSP), HTTP Dynamic Streaming, etc.

[0027]

[0036] The destination device 116 may access the encoded video data from the file server 114 through any standard data connection, including an Internet connection. This may 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, that is suitable for accessing the encoded video data stored on the file server 114. The input interface 122 may be configured to operate according to any one or more of the various protocols described above for retrieving or receiving media data from the file server 114, or other such protocols for retrieving media data.

[0028]

[0037] The output interface 108 and the input interface 122 may represent a wireless transmitter / receiver, a modem, a wired networking component (e.g., an Ethernet card), a wireless communication component operating according to any of the various IEEE 802.11 standards, or other physical components. In examples in which the output interface 108 and the input interface 122 comprise wireless components, the output interface 108 and the input interface 122 may be configured to transfer data, such as encoded video data, according to a cellular communication standard, such as 4G, 4G-LTE (Long Term Evolution), LTE Advanced, 5G, etc. In some examples in which the output interface 108 comprises a wireless transmitter, the output interface 108 and the input interface 122 may be configured to transfer data, such as encoded video data, according to other wireless standards, such as the IEEE 802.11 specification, the IEEE 802.15 specification (e.g., ZigBee), the Bluetooth standard, etc. In some examples, the source device 102 and / or the destination device 116 may include respective system-on-chip (SoC) devices. For example, the source device 102 may include a SoC device for performing functions attributable to the video encoder 200 and / or the output interface 108, and the destination device 116 may include a SoC device for performing functions attributable to the video decoder 300 and / or the input interface 122.

[0029]

[0038] The techniques of this disclosure may be applied to video coding supporting any of a variety of multimedia applications, such as over-the-air television broadcast, cable television transmission, satellite television transmission, Internet streaming video transmission such as Dynamic Adaptive Streaming over HTTP (DASH), digital video encoded on a data storage medium, decoding of digital video stored on a data storage medium, or other applications.

[0030]

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

[0031]

[0040] Although not shown in FIG. 1, in some examples, the video encoder 200 and the video decoder 300 may each be integrated with an audio encoder and / or an audio decoder and may include appropriate MUX-DEMUX units or other hardware and / or software to handle multiplexed streams that include both audio and video in a common data stream.

[0032]

[0041] The video encoder 200 and the video decoder 300 may each be implemented as any of a variety of suitable encoder and / or decoder circuits, or any combination thereof, 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, etc. When the techniques are implemented partially in software, the device may store instructions for the software on a suitable non-transitory computer-readable medium and execute the instructions in hardware using one or more processors to implement the techniques of this disclosure. Each of the video encoder 200 and the video decoder 300 may be included in one or more encoders or decoders, any of which may be integrated as part of a combined encoder / decoder (codec) in the respective device. The device including the video encoder 200 and / or the video decoder 300 may comprise an integrated circuit, a microprocessor, and / or a wireless communication device such as a cellular phone.

[0033]

[0042] The video encoder 200 and the video decoder 300 may operate according to a video coding standard, such as ITU-T H.265, also referred to as High Efficiency Video Coding (HEVC), or extensions thereof, such as multiview and / or scalable video coding extensions. Alternatively, the video encoder 200 and the video decoder 300 may operate according to other proprietary or industry standards, such as ITU-T H.266, also referred to as Generic Video Coding (VVC). In other examples, the video encoder 200 and the video decoder 300 may operate according to a proprietary video codec / format, such as AOMedia Video1 (AV1), an extension of AV1, and / or a successor version of AV1 (e.g., AV2). In other examples, the video encoder 200 and the video decoder 300 may operate according to other proprietary formats or industry standards. However, the techniques of this disclosure are not limited to any particular coding standard or format. In general, video encoder 200 and video decoder 300 may be configured to implement the techniques of this disclosure with any video coding technique that uses symbol prediction and / or uses a probability model (e.g., as indicated by the context) to code one or more syntax elements related to symbol prediction.

[0034]

[0043] Generally, the video encoder 200 and the 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., encoded, decoded, or otherwise used in 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, the video encoder 200 and the video decoder 300 may code video data represented in a YUV (e.g., Y, Cb, Cr) format. That is, rather than coding red, green, and blue (RGB) data for a sample of a picture, the video encoder 200 and the video decoder 300 may code a luminance component and a chrominance component, where the chrominance component may include both red and blue hues of chrominance components. In some examples, the video encoder 200 converts received RGB format data to a YUV representation prior to encoding, and the video decoder 300 converts the YUV representation to the RGB format. Alternatively, pre-processing and post-processing units (not shown) may perform these conversions.

[0035]

[0044] This disclosure may generally refer to coding (e.g., encoding and decoding) a picture to include processes of encoding or decoding data for a picture. Similarly, this disclosure may refer to coding a block of a picture to include processes of encoding or decoding data for the block, e.g., predictive and / or residual coding. A coded video bitstream generally includes a series of values ​​for syntax elements that represent coding decisions (e.g., coding modes) and partitioning of a picture into blocks. Thus, references to coding a picture or a block should be understood generally as coding values ​​for the syntax elements that form the picture or block.

[0036]

[0045] HEVC defines various blocks, including coding units (CUs), prediction units (PUs), and transform units (TUs). According to HEVC, a video coder (such as video encoder 200) partitions coding tree units (CTUs) into CUs according to a quadtree structure. That is, the video coder partitions CTUs and CUs into four equal non-overlapping squares, and each node of the quadtree has either zero or four child nodes. A node without children may be called a "leaf node", and a CU of such a leaf node may include one or more PUs and / or one or more TUs. The video coder may further partition PUs and TUs. For example, in HEVC, a residual quadtree (RQT) represents the partition of TUs. In HEVC, a PU represents inter-predicted data, and a TU represents residual data. An intra-predicted CU includes intra-prediction information, such as an intra-mode indication.

[0037]

[0046] As another example, the video encoder 200 and the video decoder 300 may be configured to operate according to VVC. According to VVC, a video coder (such as the video encoder 200) partitions a picture into multiple coding tree units (CTUs). The video encoder 200 may partition the CTUs according to a tree structure, such as a quad-tree binary tree (QTBT) structure or a multi-type tree (MTT) structure. The QTBT structure eliminates the concept of multiple partition types, such as the separation between CUs, PUs, and TUs in HEVC. The QTBT structure includes two levels, a first level partitioned according to a quad-tree partition and a second level partitioned according to a binary tree partition. The root node of the QTBT structure corresponds to a CTU. The leaf nodes of the binary tree correspond to coding units (CUs).

[0038]

[0047] In the MTT partitioning structure, blocks may be partitioned using quad tree (QT) partitioning, binary tree (BT) partitioning, and one or more types of triple tree (TT) (also called ternary tree (TT)) partitioning. A triple tree or ternary tree partitioning is a partitioning in which a block is split into three sub-blocks. In some examples, a triple tree or ternary tree partitioning splits a block into three sub-blocks without splitting the original block through the center. The partitioning types in MTT (e.g., QT, BT, and TT) may be symmetric or asymmetric.

[0039]

[0048] When operating according to the AV1 codec, the video encoder 200 and the video decoder 300 may be configured to code the video data in blocks. In AV1, the largest coding block that may be processed is called a superblock. In AV1, a superblock may be either 128×128 luma samples or 64×64 luma samples. However, in successor video coding formats (e.g., AV2), a superblock may be defined by a different (e.g., larger) luma sample size. In some examples, a superblock is the top level of a block quad tree. The video encoder 200 may further partition the superblock into smaller coding blocks. The video encoder 200 may partition the superblock and other coding blocks into smaller blocks using square or non-square partitions. The non-square blocks may include N / 2×N, N×N / 2, N / 4×N, and N×N / 4 blocks. The video encoder 200 and the video decoder 300 may perform a separate prediction and transform process for each of the coding blocks.

[0040]

[0049] AV1 also defines tiles of video data. A tile is a rectangular array of superblocks that may be coded independently of other tiles. That is, video encoder 200 and video decoder 300 may encode and decode coding blocks within a tile, respectively, without using video data from other tiles. However, video encoder 200 and video decoder 300 may perform filtering across tile boundaries. Tiles may be uniform or non-uniform in size. Tile-based coding may enable parallel processing and / or multithreading for encoder and decoder implementations.

[0041]

[0050] 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, and 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 both chrominance components (or two QTBT / MTT structures for each chrominance component).

[0042]

[0051] Video encoder 200 and video decoder 300 may be configured to use quadtree partitioning, QTBT partitioning, MTT partitioning, superblock partitioning, or other partitioning structures.

[0043]

[0052] In some examples, the CTU includes a coding tree block (CTB) of luma samples, two corresponding CTBs of chroma samples for a picture with three sample arrays, or a CTB of samples for a monochrome picture, or a picture coded using three separate color planes and syntax structures used to code the samples. The CTB may be an N×N block of samples for some value of N such that the division of the components into the CTB is partitioned. The components are arrays or single samples from one of the three arrays (luma and two chromas) that configure the picture in 4:2:0, 4:2:2, or 4:4:4 color format, or an array or single sample of an array that configures the picture in monochrome format. In some examples, the coding block is an M×N block of samples for some value of M and N such that the division of the CTB into coding blocks is partitioned.

[0044]

[0053] Blocks (e.g., CTUs or CUs) may be grouped in various ways in a picture. As an example, a brick may refer to a rectangular region of a CTU row in a particular tile in a picture. A tile may be a rectangular region of a CTU in a particular tile column and a particular tile row in a picture. A tile column refers to a rectangular region of a CTU having a height equal to the height of the picture and a width specified by a syntax element (e.g., in a picture parameter set). A tile row refers to a rectangular region of a CTU having a height specified by a syntax element (e.g., in a picture parameter set) and a width equal to the width of the picture.

[0045]

[0054] In some examples, a tile may be partitioned into multiple bricks, each of which may include one or more CTU rows within the tile. A tile that is not partitioned into multiple bricks may also be referred to as a brick. However, a brick that is a true subset of a tile may not be referred to as a tile. Bricks in a picture may also be arranged in slices. A slice may be an integer number of bricks of a picture that may be contained entirely in a single Network Abstraction Layer (NAL) Unit. In some examples, a slice includes either several complete tiles or only a continuous sequence of complete bricks of one tile.

[0046]

[0055] This disclosure may use "NxN" and "N by N", e.g., 16x16 samples or 16 by 16 samples, interchangeably to refer to sample dimensions of a block (such as a CU or other video block) in terms of vertical and horizontal dimensions. Generally, a 16x16 CU has 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. Samples in a CU may be arranged in rows and columns. Moreover, a CU does not necessarily have to have the same number of samples in the horizontal direction as in the vertical direction. For example, a CU may comprise NxM samples, where M is not necessarily equal to N.

[0047]

[0056] The video encoder 200 encodes video data for a CU that represents prediction and / or residual information, as well as other information. The prediction information indicates how the CU should be predicted to form a predictive block for the CU. The residual information generally represents sample-by-sample differences between samples of the CU prior to encoding and the predictive block.

[0048]

[0057] To predict a CU, the video encoder 200 may generally form a predictive block for the CU through inter-prediction or intra-prediction. Inter-prediction generally refers to predicting a CU from data of a previously coded picture, while intra-prediction generally refers to predicting a CU from previously coded data of the same picture. To perform inter-prediction, the video encoder 200 may generate a predictive block using one or more motion vectors. The video encoder 200 may generally perform a motion search to identify a reference block that closely matches the CU, for example, with respect to the difference between the CU and the reference block. The video encoder 200 may calculate a difference metric using a sum of absolute differences (SAD), sum of squared differences (SSD), mean absolute difference (MAD), mean squared difference (MSD), or other such difference calculation to determine whether the reference block closely matches the current CU. In some examples, the video encoder 200 may predict the current CU using unidirectional or bidirectional prediction.

[0049]

[0058] Some examples of VVC also provide an affine motion compensation mode, which may be considered an inter-prediction mode. In an affine motion compensation mode, video encoder 200 may determine two or more motion vectors that represent non-translational motion, such as zooming in or out, rotation, perspective motion, or other irregular motion types.

[0050]

[0059] To perform intra prediction, the video encoder 200 may select an intra prediction mode to generate a predictive block. Some examples of VVC provide 67 intra prediction modes, including various directional modes, as well as planar and DC modes. In general, the video encoder 200 selects an intra prediction mode that describes neighboring samples relative to a current block (e.g., a block of a CU) from which samples of the current block should be predicted. Such samples may generally be above, to the left of, or to the left of the current block in the same picture as the current block, assuming that the video encoder 200 codes the CTUs and CUs in raster scan order (left to right, top to bottom).

[0051]

[0060] Video encoder 200 encodes data representing a prediction mode for the current block. For example, in an inter prediction mode, video encoder 200 may encode data representing which of various available inter prediction modes is used, as well as motion information for the corresponding mode. In the case of unidirectional or bidirectional inter prediction, for example, video encoder 200 may encode motion vectors using advanced motion vector prediction (AMVP) or merge mode. Video encoder 200 may use similar modes to encode motion vectors for affine motion compensation modes.

[0052]

[0061] AV1 includes two common techniques for encoding and decoding coding blocks of video data. The two common techniques are intra prediction (e.g., intra-frame prediction or spatial prediction) and inter prediction (e.g., inter-frame prediction or temporal prediction). In the context of AV1, when predicting a block of a current frame of video data using an intra-predictive coding mode, the video encoder 200 and the video decoder 300 do not use video data from other frames of the video data. In most intra-predictive coding modes, the video encoder 200 encodes a block of the current frame based on a difference between a sample value in the current block and a predicted value generated from a reference sample in the same frame. The video encoder 200 determines a predicted value generated from a reference sample based on the intra-predictive coding mode.

[0053]

[0062] Following prediction, such as intra- or inter-prediction, of a block, the video encoder 200 may calculate residual data for the block. The residual data, such as a residual block, represents sample-by-sample differences between the block and a predictive block for the block formed using a corresponding prediction mode. The video encoder 200 may apply one or more transforms to the residual block to produce transformed data in a transform domain rather than the sample domain. For example, the video encoder 200 may apply a discrete cosine transform (DCT), an integer transform, a wavelet transform, or a conceptually similar transform to the residual video data. Additionally, the video encoder 200 may apply a secondary transform, such as a mode-dependent non-separable secondary transform (MDNSST), a signal-dependent transform, a Karhunen-Loeve transform (KLT), etc., following the first transform. The video encoder 200 produces transform coefficients following application of the one or more transforms.

[0054]

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

[0055]

[0064] Following quantization, the 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 therefore lower frequency) transform coefficients at the front of the vector and lower energy (and therefore higher frequency) transform coefficients at the rear of the vector. In some examples, the video encoder 200 may utilize 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, the video encoder 200 may perform an adaptive scan. After scanning the quantized transform coefficients to form a one-dimensional vector, the video encoder 200 may entropy code the one-dimensional vector, for example, according to context-adaptive binary arithmetic coding (CABAC). The video encoder 200 may also entropy code values ​​for syntax elements describing metadata associated with the encoded video data for use by the video decoder 300 in decoding the video data.

[0056]

[0065] To implement CABAC, the video encoder 200 may assign a context in a context model to a symbol to be transmitted. The context may relate, for example, to whether neighboring values ​​of the symbol are zero-valued or not. The probability determination may be based on the context assigned to the symbol.

[0057]

[0066] Video encoder 200 may further generate syntax data, such as block-based syntax data, picture-based syntax data, and sequence-based syntax data, for video decoder 300, e.g., in a picture header, block header, slice header, or other syntax data, such as a sequence parameter set (SPS), a picture parameter set (PPS), or a video parameter set (VPS). Video decoder 300 may similarly decode such syntax data to determine how to decode corresponding video data.

[0058]

[0067] In this manner, video encoder 200 may generate a bitstream including syntax elements that describe encoded video data, e.g., partitions of a picture into blocks (e.g., CUs) and predictive and / or residual information for the blocks. Finally, video decoder 300 may receive the bitstream and decode the encoded video data.

[0059]

[0068] In general, the video decoder 300 performs a process that is the reverse of that performed by the video encoder 200 to decode the encoded video data of the bitstream. For example, the video decoder 300 may decode values ​​for syntax elements of the bitstream using CABAC in a manner that is the reverse of, but substantially similar to, the CABAC encoding process of the video encoder 200. The syntax elements may define partition information for partitioning a picture into CTUs and partitions of each CTU according to a corresponding partition structure, such as a QTBT structure, to define CUs of the CTU. The syntax elements may further define prediction and residual information for blocks (e.g., CUs) of video data.

[0060]

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

[0061]

[0070] This disclosure may generally refer to "signaling" certain information, such as a syntax element. The term "signaling" may generally refer to communication of values ​​for syntax elements and / or other data used to decode encoded video data. That is, video encoder 200 may signal values ​​for syntax elements in a bitstream. Generally, signaling refers to generating values ​​in a bitstream. As mentioned above, source device 102 may transport the bitstream to destination device 116 in substantially real-time or may transport the bitstream to destination device 116 in non-real-time, such as may be done when storing syntax elements in storage device 112 for later retrieval by destination device 116.

[0062]

[0071] As briefly described above, the video encoder 200 may be configured to perform sign prediction for a certain number of transform coefficients. For example, if two signs are predicted, there may be four possible combinations, or sign prediction hypotheses, namely (+,+), (+,-), (-,+), (-,-). For all four combinations, a cost function is calculated, and the combination (e.g., the sign prediction hypothesis) with the smallest cost is selected as the sign predictor combination. The video decoder 300 may perform the inverse process.

[0063]

[0072] For transform coefficients for which sign prediction is performed, instead of bypass signaling, video encoder 200 may code and signal a context-coded bin (e.g., a sign prediction syntax element) to indicate whether the actual transform coefficient sign is equal to the hypothesis. In previous techniques, the context used to code the sign prediction syntax element was dependent on the transform coefficient magnitude. This disclosure describes different techniques for determining a context for coding the sign prediction syntax element. In particular, video encoder 200 and video decoder 300 may be configured to determine a context for coding a sign prediction syntax element for a transform coefficient based on a position of the transform coefficient in a block of video data, and code the sign prediction syntax element using the context, where the sign prediction syntax element indicates whether the sign prediction hypothesis is correct for the transform coefficient.

[0064]

[0073] Yao-Jen Chang et al., "Compression efficiency methods beyond VVC," Joint Video Experts Team (JVET) of ITU-T SG16 WP3 and ISO / IEC JTC1 / SC29, 21st Meeting via Teleconference, January 6-15, 2021 (hereinafter "JVET-U0100"), describes a coding tool called transform coefficient sign prediction. The basic concept of one exemplary transform coefficient sign prediction method is to calculate reconstructed residuals for both negative and positive sign combinations for applicable transform coefficients and select the hypothesis that minimizes a cost function.

[0065]

[0074] For example, if the video encoder 200 and the video decoder 300 are configured to predict two code values ​​for two transform coefficients, there may be four possible combinations: two positive signs (+,+), a positive sign followed by a negative sign (+,-), a negative sign followed by a positive sign (-,+), and two negative signs (-,-). For all four combinations, the video encoder 200 and the video decoder 300 may be configured to calculate a cost function and select the code combination with the smallest cost as the code predictor combination (e.g., code prediction hypothesis). The same process applies when more codes are predicted and more combinations are to be tried. The number of combinations to analyze is a trade-off between implementation complexity and compression efficiency. That is, more code combinations may result in better coding efficiency, but at the expense of implementation complexity.

[0066]

[0075] For transform coefficients to which sign prediction may be applied, instead of bypass coding (e.g., fixed probability coding) a syntax element indicating the sign itself, the video encoder 200 may be configured to code and signal a context-coded bin (e.g., syntax element) to indicate whether the sign of the transform coefficient is equal to the sign prediction hypothesis. Similarly, the video decoder 300 may be configured to receive and decode a context-coded bin (e.g., syntax element) to determine whether the sign of a currently decoded transform coefficient is equal to the sign prediction hypothesis. In one example, the context (e.g., probability model) used by the video encoder 200 and the video decoder 300 depends on the transform coefficient magnitude. That is, the video encoder 200 and the video decoder 300 determine the magnitude of the transform coefficient and then use that magnitude to determine which context to use. In one example, the video encoder 200 and the video decoder 300 may be configured to use two contexts (e.g., two for luma and two for chroma) for each luma and chroma component separately. This disclosure describes other example techniques for context modeling (e.g., determining a context) for code prediction. The techniques of this disclosure may result in context selection that provides increased coding efficiency.

[0067]

[0076] In some examples of sign predictive coding, the video encoder 200 and the video decoder 300 may not perform an inverse transform to reconstruct the residual block. Instead, the video encoder 200 and the video decoder 300 may derive the reconstructed residual block based on pre-stored elemental residuals multiplied by coefficient magnitudes accumulated for all coefficients whose sign values ​​are predicted.

[0068]

[0077] More specifically, a transform coefficient block may be represented as a sum of blocks in which only one transform coefficient is non-zero. Moreover, the one non-zero transform coefficient value may be set to a value of one. To obtain a final reconstructed residual block, the video encoder 200 and the video decoder 300 may multiply the reconstructed residual corresponding to the coefficient magnitude equal to one by the signed coefficient magnitude. Figure 2 is a conceptual diagram illustrating an example transform block decomposition.

[0069]

[0078] 2, transform coefficient block 400 includes two non-zero coefficients. The top left coefficient has a value of 5, and the coefficient two positions to the right has a value of −2. Transform coefficient block 400 may be decomposed as the sum of transform coefficient block 402 and transform coefficient block 404. Transform coefficient block 402 has a single non-zero transform coefficient with a value of 1 in its top left corner, which is multiplied by 5 (e.g., the magnitude and sign of the original transform coefficient in transform coefficient block 400). Transform coefficient block 404 has a single non-zero transform coefficient with a value of 1 in its two positions to the right of its top left corner, which is multiplied by −2 (e.g., the magnitude and sign of the original transform coefficient in transform coefficient block 400).

[0070]

[0079] As can be seen from the example of FIG. 2, the inverse transform may be calculated only once for every single non-zero coefficient with magnitude equal to 1. The video decoder 300 may be configured to derive the final reconstruction as a scaled sum of reconstructed elementary residuals. The reconstructed elementary residuals (or templates) are pre-computed with a predetermined (e.g., 8-bit) precision for each element of the lookup table and stored in the table. Since the discontinuity is measured considering only the first row and the first column of the transform block, as will be explained later, the lookup table size may be reduced to the length of the width+height of the block, per transform basis function. The transform basis functions used to calculate the templates correspond to primary transform (e.g., enhanced multiple transform (EMT)) basis. However, since the precision is reduced to 8 bits, the obtained templates may be the same or similar. In such a case, the templates are merged to reduce the storage memory.

[0071]

[0080] In some examples, the accuracy of the sign prediction depends on the coefficient magnitude. In general, the smaller the magnitude, the less noticeable the discontinuity measure difference. Therefore, for a given number of predicted signs, the non-zero coefficients in the upper left frequency area of ​​the transform coefficient block are selected according to a coefficient magnitude threshold. The coefficient magnitude threshold classifies the coefficients into two groups whose signs are predicted with high or low probability (e.g., high probability context or low probability context). The coefficients are scanned in raster scan order, and the coefficients with magnitudes above the threshold are classified as being in the high prediction probability group. Otherwise, the coefficients are classified as being in the low probability prediction group. If the number of coefficients in the high predicted probability group is smaller than the total number of coefficient signs to be predicted, the coefficients from the low predicted probability group are added.

[0072]

[0081] To derive the best code prediction hypothesis of all possible combinations, a cost function may be defined and used. The cost function is defined as a discontinuity measure across block boundaries. The video encoder 200 and the video decoder 300 may calculate the discontinuity measure for all hypotheses, and the hypothesis with the minimum cost is selected as the predictor for the transform coefficient code. FIG. 3 is a conceptual diagram illustrating an exemplary discontinuity measure in code prediction. FIG. 3 illustrates a block 410 with reconstructed neighbors 420 across block boundaries from reconstructed code candidates 430. The discontinuity measure cost function is described below.

[0073]

[0082] In one example, the cost function is defined as the sum of absolute second derivatives in the residual domain for the top row and left column:

[0074]

number

[0075] where R is the reconstructed neighbor, P is the prediction of the current block, and r is the residual hypothesis. The term (-R -1 +2R0-P1) can be calculated only once per block and only the residual hypothesis is subtracted.

[0076]

[0083] In previous techniques for sign prediction, syntax elements that indicate whether the sign prediction is correct (e.g., the sign prediction hypothesis matches the actual sign) are context coded using a context that depends on the magnitude of the transform coefficient. Such syntax elements are sometimes referred to as sign prediction syntax elements. Using the magnitude of the transform coefficient to determine the sign prediction context requires that the magnitude be determined before the sign prediction context can be selected and the sign prediction syntax element can be coded. Furthermore, in previous techniques for sign prediction, the context selection does not depend on the coefficient position within the block and does not depend on whether the block is intra-coded or inter-coded. In general, intra-predicted blocks tend to have more non-zero coefficients with higher magnitudes. Using the same context for inter-coded and intra-coded blocks may create suboptimal compression efficiency.

[0077]

[0084] Techniques of this disclosure may address the above-mentioned problems. In particular, techniques of this disclosure may include determining a context for coding a sign prediction syntax element based on one or more of the position of a transform coefficient in a block and / or the coding mode used to code the block. Because characteristics (e.g., magnitude and sign) of a transform coefficient may differ based on the position in the block and the coding mode used to generate the transform coefficient, using the position and / or coding mode of the transform coefficient to determine a context for coding the sign prediction may improve coding efficiency. Techniques of this disclosure may be used to determine a context for a sign prediction syntax element regardless of the technique used to determine the value of the sign prediction syntax element itself.

[0078]

[0085] The techniques described below may be used in any combination. For example, in addition to or instead of determining the context based on the coefficient magnitude, any combination of the techniques for determining the context described below may be used. In some examples, the use of the coefficient magnitude may be optional.

[0079]

[0086] Transform coefficient position dependent context

[0087] In one example, to code a sign prediction syntax element, the video encoder 200 and the video decoder 300 may be configured to determine a context based on a transform coefficient position in a block or a position of the transform block itself when there are multiple transform blocks in one coding or prediction unit. Coding the sign prediction syntax element includes encoding and / or decoding a context-coded bin that indicates whether the sign of the transform coefficient is equal to a sign prediction hypothesis. That is, the video encoder 200 and the video decoder 300 may be configured to use the determined context to code a syntax element that indicates whether the sign of the transform coefficient is equal to a sign prediction hypothesis. Determining a context based on a transform coefficient in a block generally means that the position (e.g., location) of the transform coefficient in the block is an input to a function that determines the context to use.

[0080]

[0088] In a general example of this disclosure, video encoder 200 may be configured to determine a context for encoding a sign prediction syntax element for a transform coefficient based on a position of the transform coefficient in a block of video data, and to encode the sign prediction syntax element using the context, where the sign prediction syntax element indicates whether a sign prediction hypothesis is correct for the transform coefficient. In an inverse manner, video decoder 300 may be configured to determine a context for decoding a sign prediction syntax element for a transform coefficient based on a position of the transform coefficient in a block of video data, and to decode the sign prediction syntax element using the context, where the sign prediction syntax element indicates whether a sign prediction hypothesis is correct for the transform coefficient. Examples of positions of transform coefficients and how their positions affect context determination are described in more detail below.

[0081]

[0089] In one example, video encoder 200 and video decoder 300 may be configured to allocate a dedicated context (e.g., context 0) for coding a sign prediction of a DC coefficient (e.g., the first coefficient in the upper left corner of a block) and another context (e.g., context 1) for coding a sign prediction of a non-DC coefficient. That is, in general, video encoder 200 and video decoder 300 may determine a context for coding a sign prediction syntax element for a transform coefficient based on whether the transform coefficient is a DC coefficient. More specifically, in another example, video encoder 200 and video decoder 300 may be configured to determine a first context for decoding a sign prediction syntax element based on the transform coefficient being a DC coefficient and to determine a second context for decoding the sign prediction syntax element based on the transform coefficient not being a DC coefficient.

[0082]

[0090] FIG. 4 is a conceptual diagram illustrating an example location of transform coefficients. FIG. 4 illustrates an example of a 4×4 block of transform coefficients. Each small block represents the location of a transform coefficient where a sign predictive syntax element may be coded. In the above example, FIG. 4 illustrates a block 440 having a DC coefficient 442. Generally, the DC coefficient is the top-left transform coefficient in a block or sub-block. In the example of block 440, the video encoder 200 and the video decoder 300 may determine to use a first context to code a sign predictive syntax element for the DC coefficient 442 and may determine to use a second, different context to code a sign predictive syntax element for other transform coefficients of the block 440.

[0083]

[0091] In another example, the video encoder 200 and the video decoder 300 may divide a block into multiple portions or regions, where the portions or regions of the block are associated with certain transform coefficient frequencies. The video encoder 200 and the video decoder 300 may determine a separate context for coding the sign predictive syntax elements in each portion of the block. As an example, the video encoder 200 and the video decoder 300 may divide a block into four quadrants, and the video encoder 200 and the video decoder 300 may determine a separate context for coding the sign predictive syntax elements in each quadrant. However, the block may be divided into more or fewer regions. Also, the regions may be uniform in size or have different sizes.

[0084]

[0092] 4, transform block 450 is divided into four regions (e.g., quadrants): a first region 452, a second region 454, a third region 456, and a fourth region 458. Video encoder 200 and video decoder 300 may determine separate contexts for coding sign predictive syntax elements in each of first region 452, second region 454, third region 456, and fourth region 458.

[0085]

[0093] The video encoder 200 and the video decoder 300 may also be configured to use positional symmetry in the context determination for the sign prediction syntax element. For example, the video encoder 200 and the video decoder 300 may use the same context to code the sign prediction syntax element for the transform coefficients with positions (x, y) and (y, x). For example, as shown in FIG. 4, if the block 460 is divided into four quadrants, the video encoder 200 and the video decoder 300 may use the same context to code the sign prediction in the second quadrant 462 and the third quadrant 464 (off-diagonal) such that the second and third quadrants are symmetric along the diagonal.

[0086]

[0094] In another example, the video encoder 200 and the video decoder 300 may determine the code prediction syntax element context based on the code prediction order. The code prediction order may be defined by a scan order within a block. The scan order may be one of a raster scan order, a vertical scan order, a horizontal scan order, a zigzag scan order, or any other order in which transform coefficients are coded. For example, a code prediction syntax element for a first transform coefficient in the code prediction order uses one context, a second code prediction syntax element in the code prediction order uses a second context, and so on. After a certain number of code prediction syntax elements, the video encoder 200 and the video decoder 300 may use the same context for the remaining code prediction syntax elements in the code prediction order.

[0087]

[0095] For example, the video encoder 200 and the video decoder 300 may use separate contexts for the first or first two code prediction syntax elements in the code prediction order. In some examples, the DC coefficient is the first coefficient scanned in the code prediction order. Starting from the second or third code prediction syntax element, the video encoder 200 and the video decoder 300 may use the same context for the remaining code prediction syntax elements. With reference to FIG. 4, the block 470 is scanned in a horizontal code prediction order. The numbers shown for each of the transform coefficients indicate the order in which the code prediction syntax elements are coded. In one example, the code prediction syntax elements for transform coefficients 1 and 2 share the same context, and any code prediction syntax elements for transform coefficients 3-16 share the same context. The idea behind this technique is that higher frequency coefficients (e.g., transform coefficients toward the lower right part of the block) may have less clear differences in the cost function and the code prediction detection may be less accurate compared to the first coefficient in the block along the code prediction order.

[0088]

[0096] Coding mode dependent context

[0097] In another example of this disclosure, the video encoder 200 and the video decoder 300 may determine a context for a code prediction syntax element based on a coding mode used to code a block having transform coefficients. Different prediction modes may have different residual and transform coefficient characteristics. As mentioned above, intra-predicted and inter-predicted blocks may have different residual energies (e.g., the absolute magnitude of the residual values ​​may generally be higher for intra-coded blocks).

[0089]

[0098] It may be beneficial to use separate contexts for the sign prediction syntax elements of transform coefficients generated using different prediction modes. In some examples, the video encoder 200 and the video decoder 300 may determine a context for coding the sign prediction based on the prediction mode in combination with other methods, e.g., in combination with one or more of the position-dependent context allocation techniques described above. For example, a first subset of contexts may be used for inter-predicted blocks and a second subset of contexts may be used for intra-predicted blocks. The particular context determined from each of the first and second subsets may then be based on the position of the transform coefficient in the block for which the sign prediction syntax element is to be coded.

[0090]

[0099] In one example, the video encoder 200 and the video decoder 300 may be configured to use separate contexts and / or separate sets of contexts for coding sign predictive syntax elements for transform coefficients from blocks coded in intra mode and inter mode.

[0091]

[0100] In another example, the video encoder 200 and the video decoder 300 may be configured to determine a context for coding a sign predictive syntax element based on what type of primary transform kernel and / or secondary transform kernel is used when coding a block. In one example, the video encoder 200 and the video decoder 300 may be configured to determine a context for coding a sign predictive syntax element based on a primary transform index and / or a secondary transform index. In another example, the video encoder 200 and the video decoder 300 may be configured to determine a context for coding a sign predictive syntax element based on whether the primary transform is a DCT2 or not. In another example, the video encoder 200 and the video decoder 300 may be configured to determine a context for coding a sign predictive syntax element based on whether a secondary transform is applied or not.

[0092]

[0101] In another example, the video encoder 200 and the video decoder 300 may be configured to determine a context for coding a sign predictive syntax element based on an intra-prediction coding mode (e.g., an intra-prediction direction). In general, the video encoder 200 and the video decoder 300 may be configured to determine a context for coding a sign predictive syntax element depending on a coding tool that may be applied to code a block. For example, the video encoder 200 and the video decoder 300 may be configured to determine a separate context for coding a sign predictive syntax element of a transform coefficient for each coding tool that may be applied to a block.

[0093]

[0102] Efficient Calculations

[0103] Predicting the sign (e.g., generating sign prediction hypotheses) involves computing a cost function for different sign prediction hypotheses and determining the sign prediction hypothesis with the minimum cost. The inputs R to the cost function are the reconstructed neighbors, the prediction P of the current block, the set C of known coefficients, and the set A of coefficients whose absolute values ​​are known but whose signs are to be predicted. The residual (r) has two components, one corresponding to the known coefficients and one corresponding to the coefficients whose signs are to be predicted, where r = r k +r u The value r k = IT(C) is calculated from the known coefficients using the inverse transformation IT, r u is based on a coefficient (A below) whose sign is unknown but whose magnitude is known.

[0094]

[0104] The video encoder 200 and the video decoder 300 generate a template of the reconstructed basis functions. i ) can be used to perform efficient computation of the sign prediction hypotheses. Given a set of coefficient absolute values ​​and a set of sign prediction hypotheses, the residual hypotheses (r hypothesis ) is defined via a template as:

[0095]

number

[0096]

[0105] The number F is used to combine the template values ​​to form a modified cost function. The cost function is modified to include the value F, the known residuals, and terms that are based on the symbol prediction hypotheses and the template values, as follows:

[0097]

number

[0098]

[0106] The video encoder 200 and the video decoder 300 are configured to use the hypothesis that minimizes this modified cost function as a prediction of the code value.

[0099]

[0107] 5 is a block diagram illustrating an example video encoder 200 that may implement the techniques of this disclosure. FIG. 5 is provided for illustrative purposes and should not be considered as limiting the techniques broadly illustrated and described in this disclosure. For illustrative purposes, this disclosure describes video encoder 200 in accordance with VVC (ITU-T H.266 under development) and HEVC (ITU-T H.265) techniques. However, the techniques of this disclosure may be implemented by video encoding devices configured for other video coding standards and video coding formats, such as AV1 and successors of the AV1 video coding format.

[0100]

[0108] 5, 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 coding unit 220. Any 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 coding unit 220 may be implemented in one or more processors or processing circuits. For example, the units of the video encoder 200 may be implemented as one or more circuits or logic elements, as part of a hardware circuit, or as part of a processor, an ASIC, or an FPGA. Moreover, video encoder 200 may include additional or alternative processors or processing circuitry for performing these and other functions.

[0101]

[0109] The video data memory 230 may store video data to be encoded by the components of the video encoder 200. The video encoder 200 may receive video data stored in the video data memory 230, for example, from the video source 104 (FIG. 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 by any of a variety of memory devices, such as synchronous dynamic random access memory (DRAM), including 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 with the other components of the video encoder 200, as shown, or off-chip relative to those components.

[0102]

[0110] In this disclosure, references to video data memory 230 should not be construed as limited to memory internal to video encoder 200 unless specifically so described, or to memory external to video encoder 200 unless specifically so described. Instead, references to video data memory 230 should be understood as a reference memory that stores video data that video encoder 200 receives for encoding (e.g., video data for a current block to be encoded). Memory 106 of FIG. 1 may also provide temporary storage of outputs from various units of video encoder 200.

[0103]

[0111] The various units in FIG. 5 are shown to aid in understanding the operations performed by the video encoder 200. The units may be implemented as fixed-function circuits, programmable circuits, or a combination thereof. A fixed-function circuit refers to a circuit that provides a specific function and is preset with respect to the operations that may be performed. A programmable circuit refers to a circuit that may be programmed to perform various tasks and to provide flexible functionality in the operations that may be performed. For example, a programmable circuit may execute software or firmware that causes the programmable circuit to operate in a manner defined by the software or firmware instructions. A fixed-function circuit may execute software instructions (e.g., to receive parameters or output parameters), but the type of operations that the fixed-function circuit performs is generally unchanging. In some examples, one or more of the units may be separate circuit blocks (fixed function or programmable), and in some examples, one or more of the units may be an integrated circuit.

[0104]

[0112] The video encoder 200 may include an arithmetic logic unit (ALU), a basic functional unit (EFU), a programmable core formed of digital circuits, analog circuits, and / or programmable circuits. In examples in which the operations of the video encoder 200 are implemented using software executed by a programmable circuit, the memory 106 (FIG. 1) may store instructions (e.g., object code) of the software that the video encoder 200 receives and executes, or another memory (not shown) within the video encoder 200 may store such instructions.

[0105]

[0113] The video data memory 230 is configured to store the received video data. The video encoder 200 may 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 may be raw video data to be encoded.

[0106]

[0114] 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 may include additional functional units for performing video prediction according to other prediction modes. By way of example, the mode selection unit 202 may include a palette unit, an intra block copy unit (which may be part of the motion estimation unit 222 and / or the motion compensation unit 224), an affine unit, a linear model (LM) unit, etc.

[0107]

[0115] The mode selection unit 202 generally coordinates multiple encoding passes to test combinations of encoding parameters and resulting rate-distortion values ​​for such combinations. The encoding parameters may include partitioning of the CTU into CUs, prediction modes for the CUs, transform types for residual data of the CUs, quantization parameters for residual data of the CUs, etc. The mode selection unit 202 may finally select a combination of encoding parameters that has a rate-distortion value that is better than other tested combinations.

[0108]

[0116] Video encoder 200 may partition a picture retrieved from video data memory 230 into a series of CTUs and encapsulate one or more CTUs in a slice. Mode select unit 202 may partition the CTUs of the picture according to a tree structure, such as the MTT structure, the QTBT structure, the superblock structure, or the quadtree structure described above. As described above, video encoder 200 may form one or more CUs from partitioning the CTUs according to the tree structure. Such CUs may also be generally referred to as "video blocks" or "blocks."

[0109]

[0117] In general, 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 in HEVC, the overlapping portion of the PU and TU). For inter prediction of the current block, the motion estimation unit 222 may perform motion search to identify one or more closely matching reference blocks in one or more reference pictures (e.g., one or more previously coded pictures stored in the DPB 218). In particular, the motion estimation unit 222 may calculate a value representing how similar a potential reference block is to the current block according to, for example, a sum of absolute differences (SAD), a sum of squared differences (SSD), a mean absolute difference (MAD), a mean squared difference (MSD), etc. The motion estimation unit 222 may generally perform these calculations using a sample-by-sample difference between the current block and the reference block under consideration. Motion estimation unit 222 may identify the reference block having the lowest value resulting from these calculations, which indicates the reference block that most closely matches the current block.

[0110]

[0118] 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, in unidirectional inter prediction, the motion estimation unit 222 may provide a single motion vector, while in bidirectional inter prediction, the motion estimation unit 222 may provide two motion vectors. The motion compensation unit 224 may then generate a predictive block using the motion vectors. 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 sub-sample precision, the motion compensation unit 224 may interpolate values ​​for the predictive block according to one or more interpolation filters. Moreover, in bidirectional inter prediction, the motion compensation unit 224 may retrieve data for the two reference blocks identified by the respective motion vectors and combine the retrieved data, for example, through sample-wise averaging or weighted averaging.

[0111]

[0119] When operating according to the AV1 video coding format, the motion estimation unit 222 and the motion compensation unit 224 may be configured to encode coding blocks of video data (e.g., both luma coding blocks and chroma coding blocks) using translational motion compensation, affine motion compensation, overlapped block motion compensation (OBMC), and / or synthetic inter-intra prediction.

[0112]

[0120] As another example, for intra prediction, or intra predictive coding, the intra prediction unit 226 may generate a predictive block from samples neighboring a current block. For example, in a directional mode, the intra prediction unit 226 may generally mathematically combine values ​​of neighboring samples and populate these calculated values ​​in a defined direction across the current block to produce a predictive block. As another example, in a DC mode, the intra prediction unit 226 may calculate an average of neighboring samples for the current block and generate a predictive block to include this resulting average for each sample of the predictive block.

[0113]

[0121] When operating according to the AV1 video coding format, the intra prediction unit 226 may be configured to encode coding blocks of video data (e.g., both luma coding blocks and chroma coding blocks) using directional intra prediction, non-directional intra prediction, recursive filter intra prediction, chroma-from-luma (CFL) prediction, intra block copy (IBC), and / or color palette modes. The mode selection unit 202 may include additional functional units for performing video prediction according to other prediction modes.

[0114]

[0122] The mode selection unit 202 provides the prediction block to the residual generation unit 204. The residual generation unit 204 receives a raw, uncoded 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 sample-by-sample differences between the current block and the prediction block. The resulting sample-by-sample differences define a residual block for the current block. In some examples, the residual generation unit 204 may also determine differences between sample values ​​in the residual block to generate the residual block using residual differential pulse code modulation (RDPCM). In some examples, the residual generation unit 204 may be formed using one or more subtractor circuits that perform binary subtraction.

[0115]

[0123] In an example where the mode selection unit 202 partitions a CU into PUs, each PU may be associated with a luma prediction unit and a corresponding chroma prediction unit. The video encoder 200 and the video decoder 300 may support PUs having various sizes. As indicated above, the size of a CU may refer to the size of the luma coding block of the CU, and the size of a PU may refer to the size of the luma prediction unit of the PU. Assuming that the size of a particular CU is 2N×2N, the video encoder 200 may support a PU size of 2N×2N or N×N for intra prediction, and a symmetric PU size of 2N×2N, 2N×N, N×2N, N×N, or the like for inter prediction. The video encoder 200 and the video decoder 300 may also support asymmetric partitioning for PU sizes of 2N×nU, 2N×nD, nL×2N, and nR×2N for inter prediction.

[0116]

[0124] In examples where the mode select unit 202 does not further partition the CUs into PUs, each CU may be associated with a luma coding block and a corresponding chroma coding block. As described above, the size of a CU may refer to the size of the luma coding block of the CU. The video encoder 200 and the video decoder 300 may support CU sizes of 2N×2N, 2N×N, or N×2N.

[0117]

[0125] In other video coding techniques, such as intra block copy mode coding, affine mode coding, and linear model (LM) mode coding, as some examples, the mode selection unit 202 generates a predictive block for the current block being coded via a respective unit associated with the coding technique. In some examples, such as palette mode coding, the mode selection unit 202 may not generate a predictive block, but instead generate syntax elements that indicate how the block should be reconstructed based on a selected palette. In such modes, the mode selection unit 202 may provide these syntax elements to be coded to the entropy coding unit 220.

[0118]

[0126] As described above, the residual generation unit 204 receives the video data for a current block and the corresponding predictive block. The residual generation unit 204 then generates a residual block for the current block. To generate the residual block, the residual generation unit 204 calculates sample-by-sample differences between the predictive block and the current block.

[0119]

[0127] 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"). Transform processing unit 206 may apply various transforms to the residual block to form the transform coefficient block. For example, 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, transform processing unit 206 may perform multiple transforms on the residual block, e.g., a linear transform and a secondary transform, such as a rotation transform. In some examples, transform processing unit 206 does not apply a transform to the residual block.

[0120]

[0128] When operating according to AV1, transform processing unit 206 may apply one or more transforms to the residual block to generate a block of transform coefficients (referred to herein as a "transform coefficient block"). Transform processing unit 206 may apply various transforms to the residual block to form the transform coefficient block. For example, transform processing unit 206 may apply a horizontal / vertical transform combination that may include a discrete cosine transform (DCT), an asymmetric discrete sine transform (ADST), an inverse ADST (e.g., ADST in reverse order), and an identity transform (IDTX). When using an identity transform, the transform is skipped in one of the vertical or horizontal directions. In some examples, the transform processing may be skipped.

[0121]

[0129] 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 a 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 result in loss of information, and thus the quantized transform coefficients may have less precision than the original transform coefficients produced by transform processing unit 206.

[0122]

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

[0123]

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

[0124]

[0132] When operating according to AV1, filter unit 216 may perform one or more filter operations on the reconstructed blocks. For example, filter unit 216 may perform a deblocking operation to reduce blockiness artifacts along edges of a CU. In other examples, filter unit 216 may apply a constrained directional enhancement filter (CDEF), which may be applied after deblocking and may include application of a non-separable, nonlinear, low-pass directional filter based on the estimated edge direction. Filter unit 216 may also include a loop restoration filter, which may be applied after CDEF and may include a separable symmetric normalized Wiener filter or a dual auto-induced filter.

[0125]

[0133] The video encoder 200 stores the reconstructed blocks in the DPB 218. For example, in examples where the operations of the filter unit 216 are not performed, the reconstruction unit 214 may store the reconstructed blocks in the DPB 218. In examples where the operations of the filter unit 216 are performed, the filter unit 216 may store the filtered reconstructed blocks in the DPB 218. The motion estimation unit 222 and the motion compensation unit 224 may retrieve reference pictures formed from the reconstructed (and potentially filtered) blocks from the DPB 218 to inter predict blocks of a later-encoded picture. Additionally, the intra prediction unit 226 may use the reconstructed blocks in the DPB 218 of the current picture to intra predict other blocks in the current picture.

[0126]

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

[0127]

[0135] As described above, when implementing a sign prediction hypothesis, entropy coding unit 220 may be configured to determine a context for coding a sign prediction syntax element for the transform coefficient based on the position of the transform coefficient, and to code the sign prediction syntax element using the determined context.

[0128]

[0136] The video encoder 200 may output a bitstream that includes entropy-encoded syntax elements needed to reconstruct blocks of a slice or picture. In particular, the entropy encoding unit 220 may output the bitstream.

[0129]

[0137] According to AV1, the entropy encoding unit 220 may be configured as a symbol-to-symbol adaptive multi-symbol arithmetic coder. A syntax element in AV1 includes an alphabet of N elements, and a context (e.g., a probability model) includes a set of N probabilities. The entropy encoding unit 220 may store the probabilities as n-bit (e.g., 15-bit) cumulative distribution functions (CDFs). The entropy encoding unit 22 may perform recursive scaling with an update factor based on the alphabet size to update the context.

[0130]

[0138] The operations described above are described with respect to blocks. Such descriptions should be understood as being operations for luma coding blocks and / or chroma coding blocks. As described above, in some examples, the luma coding blocks and chroma coding blocks are luma and chroma components of a CU. In some examples, the luma coding blocks and chroma coding blocks are luma and chroma components of a PU.

[0131]

[0139] In some examples, operations performed with respect to luma coding blocks do not need to be repeated for chroma coding blocks. As an example, operations for identifying motion vectors (MVs) and reference pictures for luma coding blocks do not need to be repeated to identify MVs and reference pictures for chroma blocks. Rather, the MVs for luma coding blocks may be scaled to determine the MVs for chroma blocks, and the reference pictures may be the same. As another example, the intra prediction process may be the same for luma coding blocks and chroma coding blocks.

[0132]

[0140] Video encoder 200 represents an example of a device configured to encode video data, including a memory configured to store the video data and one or more processing units implemented in a circuit, the one or more processing units configured to determine a context for coding a sign predictive syntax element for the transform coefficient based on a position of the transform coefficient, and code the sign predictive syntax element using the determined context.

[0133]

[0141] 6 is a block diagram illustrating an example video decoder 300 that may implement the techniques of this disclosure. FIG. 6 is provided for illustrative purposes and is not intended to limit the techniques broadly illustrated and described in this disclosure. For illustrative purposes, this disclosure describes the video decoder 300 in accordance with VVC (ITU-T H.266 under development) and HEVC (ITU-T H.265) techniques. However, the techniques of this disclosure may be implemented by video coding devices configured for other video coding standards.

[0134]

[0142] In the example of FIG. 6, 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) 314. Any 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 314 may be implemented in one or more processors or processing circuits. For example, the units of the video decoder 300 may be implemented as one or more circuits or logic elements, as part of a hardware circuit, or as part of a processor, an ASIC, or an FPGA. Moreover, the video decoder 300 may include additional or alternative processors or processing circuits for performing these and other functions.

[0135]

[0143] Prediction processing unit 304 includes a motion compensation unit 316 and an intra prediction unit 318. Prediction processing unit 304 may include additional units for performing prediction according to other prediction modes. By way of example, prediction processing unit 304 may include a palette unit, an intra block copy unit (which may form part of motion compensation unit 316), an affine unit, a linear model (LM) unit, etc. In other examples, video decoder 300 may include more, fewer, or differently functional components.

[0136]

[0144] When operating according to AV1, the compensation unit 316 may be configured to decode coding blocks of the video data (e.g., both luma coding blocks and chroma coding blocks) using translational motion compensation, affine motion compensation, OBMC, and / or synthetic inter-intra prediction, as described above. The intra prediction unit 318 may be configured to decode coding blocks of the video data (e.g., both luma coding blocks and chroma coding blocks) using directional intra prediction, non-directional intra prediction, recursive filter intra prediction, CFL, intra block copy (IBC), and / or color palette mode, as described above.

[0137]

[0145] The CPB memory 320 may store video data, such as an encoded video bitstream, to be decoded by components of the video decoder 300. The video data stored in the CPB memory 320 may be obtained, for example, from the computer-readable medium 110 (FIG. 1). The CPB memory 320 may include a CPB that stores encoded video data (e.g., syntax elements) from the encoded video bitstream. The CPB memory 320 may also store video data other than syntax elements of a coded picture, such as temporary data representing output from various units of the video decoder 300. The DPB 314 generally stores decoded pictures that the video decoder 300 may output and / or use 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 by any of a variety of memory devices, such as DRAM, including SDRAM, MRAM, 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.

[0138]

[0146] Additionally or alternatively, in some examples, video decoder 300 may retrieve coded video data from memory 120 (FIG. 1). That is, memory 120 may store data as described above along with CPB memory 320. Similarly, memory 120 may store instructions to be executed by video decoder 300 when some or all of the functionality of video decoder 300 is implemented in software to be executed by processing circuitry of video decoder 300.

[0139]

[0147] The various units shown in FIG. 6 are shown to aid in understanding the operations performed by the video decoder 300. The units may be implemented as fixed-function circuits, programmable circuits, or a combination thereof. As with FIG. 5, a fixed-function circuit refers to a circuit that provides a specific function and is preset with respect to the operations that may be performed. A programmable circuit refers to a circuit that may be programmed to perform various tasks and to provide flexible functionality in the operations that may be performed. For example, a programmable circuit may execute software or firmware that causes the programmable circuit to operate in a manner defined by the software or firmware instructions. A fixed-function circuit may execute software instructions (e.g., to receive parameters or output parameters), but the type of operations that the fixed-function circuit performs is generally unchanging. In some examples, one or more of the units may be separate circuit blocks (fixed function or programmable), and in some examples, one or more of the units may be an integrated circuit.

[0140]

[0148] The video decoder 300 may include a programmable core formed from an ALU, an EFU, digital circuits, analog circuits, and / or programmable circuits. In examples in which the operations of the video decoder 300 are performed by software executing on 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.

[0141]

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

[0142]

[0150] In general, the video decoder 300 reconstructs a picture on a block-by-block basis. The video decoder 300 may perform a reconstruction operation on each block individually (wherein the block currently being reconstructed, i.e., decoded, may be referred to as the “current block”).

[0143]

[0151] The entropy decoding unit 302 may entropy decode syntax elements defining quantized transform coefficients of a quantized transform coefficient block, as well as transform information such as a quantization parameter (QP) and / or a transform mode indication(s). As described above, when implementing a sign prediction hypothesis, the entropy decoding unit 302 may be configured to determine a context for coding a sign prediction syntax element for the transform coefficient based on a position of the transform coefficient, and to code the sign prediction syntax element using the determined context.

[0144]

[0152] The inverse quantization unit 306 may use the QP associated with the quantized transform coefficient block to determine the degree of quantization and, similarly, the degree of inverse quantization that the inverse quantization unit 306 should apply. 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 thereby form a transform coefficient block including the transform coefficients.

[0145]

[0153] After the inverse quantization unit 306 forms the 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 rotational transform, an inverse transform, or another inverse transform to the transform coefficient block.

[0146]

[0154] Further, prediction processing unit 304 generates a predictive block according to the prediction information syntax element entropy decoded by entropy decoding unit 302. For example, if the prediction information syntax element indicates that the current block is inter predicted, motion compensation unit 316 may generate a predictive block. In this case, the prediction information syntax element may indicate a reference picture in DPB 314 from which to retrieve a reference block, as well as a motion vector that identifies the location of the reference block in the reference picture relative to the location of the current block in the current picture. Motion compensation unit 316 may generally perform an inter prediction process in a manner substantially similar to that described with respect to motion compensation unit 224 (FIG. 5).

[0147]

[0155] 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 predictive block according to the intra prediction mode indicated by the prediction information syntax element. Again, the intra prediction unit 318 may generally perform an intra prediction process in a manner substantially similar to that described with respect to the intra prediction unit 226 (FIG. 5). The intra prediction unit 318 may retrieve data of neighboring samples for the current block from the DPB 314.

[0148]

[0156] The reconstruction unit 310 may reconstruct the current block using the predictive block and the residual block. For example, the reconstruction unit 310 may add samples of the residual block to corresponding samples of the predictive block to reconstruct the current block.

[0149]

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

[0150]

[0158] The video decoder 300 may store the reconstructed block in the DPB 314. For example, in examples where the operations of the filter unit 312 are not performed, the reconstruction unit 310 may store the reconstructed block in the DPB 314. In examples where the operations of the filter unit 312 are performed, the filter unit 312 may store the filtered reconstructed block in the DPB 314. As described above, the DPB 314 may provide reference information to the prediction processing unit 304, such as samples of the current picture for intra prediction and previously decoded pictures for subsequent motion compensation. Moreover, the video decoder 300 may output the decoded picture (e.g., decoded video) from the DPB 314 for subsequent presentation on a display device, such as the display device 118 of FIG. 1.

[0151]

[0159] In this manner, the video decoder 300 represents an example of a video decoding device that includes a memory configured to store video data and one or more processing units implemented in a circuit, the one or more processing units configured to determine, based on a position of the transform coefficient, a context for coding a sign predictive syntax element for the transform coefficient, and code the sign predictive syntax element using the determined context.

[0152]

[0160] 7 is a flowchart illustrating an example method for encoding a current block according to the techniques of this disclosure. The current block may comprise a current CU. Although described with respect to video encoder 200 (FIGS. 1 and 5), it should be understood that other devices may be configured to implement a method similar to that of FIG.

[0153]

[0161] In this example, video encoder 200 may first predict the current block (350). For example, video encoder 200 may form a predictive block for the current block. Video encoder 200 may then calculate a residual block for the current block (352). To calculate the residual block, video encoder 200 may calculate a difference between an original uncoded block and a predictive block for the current block. Video encoder 200 may then transform the residual block and quantize transform coefficients of the residual block (354). Video encoder 200 may then scan the quantized transform coefficients of the residual block (356). During or following the scan, video encoder 200 may entropy code the transform coefficients (358). For example, video encoder 200 may code the transform coefficients using CAVLC or CABAC. Video encoder 200 may then output entropy coded data for the block (360).

[0154]

[0162] 8 is a flowchart illustrating an example method for decoding a current block of video data in accordance with the techniques of this disclosure. The current block may comprise a current CU. Although described with respect to video decoder 300 (FIGS. 1 and 6), it should be understood that other devices may be configured to perform a method similar to that of FIG.

[0155]

[0163] The video decoder 300 may receive entropy coded data for the current block, such as the entropy coded prediction information and the entropy coded data for the transform coefficients of the residual block that correspond to the current block (370). The video decoder 300 may entropy decode the entropy coded data to determine the prediction information for the current block and to reconstruct the transform coefficients of the residual block (372). The video decoder 300 may predict the current block, e.g., using the intra prediction or inter prediction mode indicated by the prediction information for the current block, to compute a predictive block for the current block (374). The video decoder 300 may then inverse scan the reconstructed transform coefficients to create a block of quantized transform coefficients (376). The video decoder 300 may then dequantize the transform coefficients and apply an inverse transform to the transform coefficients to produce a residual block (378). The video decoder 300 may finally decode the current block by combining the predictive block and the residual block (380).

[0156]

[0164] 9 is a flowchart illustrating another example method for encoding a current block in accordance with the techniques of this disclosure. The technique of FIG. 9 may be implemented by one or more structural units of the video encoder 200, including the entropy encoding unit 220.

[0157]

[0165] In one example of this disclosure, the video encoder 200 may be configured to determine a sign of a transform coefficient (500). The video encoder 200 may further be configured to determine a sign prediction hypothesis for the transform coefficient (502). In one example, the video encoder 200 may determine the sign prediction hypothesis by minimizing a cost function that includes the combined template values.

[0158]

[0166] Video encoder 200 may further determine a context for encoding a sign prediction syntax element for the transform coefficient based on a position of the transform coefficient in the block of video data, where the sign prediction syntax element indicates whether a sign prediction hypothesis for the transform coefficient is correct (504). Video encoder 200 may further encode the sign prediction syntax element using the context (506).

[0159]

[0167] In one example, to determine a context for encoding a sign predictive syntax element for the transform coefficient based on a position of the transform coefficient in a block of video data, the video encoder 200 is further configured to determine a context for encoding a sign predictive syntax element for the transform coefficient based on whether the transform coefficient is a DC coefficient.

[0160]

[0168] In another example, to determine a context for encoding a sign predictive syntax element for a transform coefficient based on a position of the transform coefficient in a block of video data, the video encoder 200 is further configured to determine a first context for encoding the sign predictive syntax element based on the transform coefficient being a DC coefficient, and to determine a second context for encoding the sign predictive syntax element based on the transform coefficient being a DC coefficient.

[0161]

[0169] In another example, to determine a context for encoding a code predictive syntax element for a transform coefficient based on a position of the transform coefficient in the block of video data, the video encoder 200 is further configured to determine a context for encoding the code predictive syntax element based on a code predictive order in the block of video data, where the position of the transform coefficient in the block of video data is based on the code predictive order.

[0162]

[0170] In another example, the video encoder 200 is further configured to determine a context for encoding a sign predictive syntax element for the transform coefficient based further on the coding mode used to encode the block. That is, the video encoder 200 is configured to determine a context for the sign predictive syntax element based on both the position and the coding mode of the transform coefficient.

[0163]

[0171] In another example, to determine a context for encoding a code predictive syntax element for a transform coefficient further based on the coding mode, the video encoder 200 is further configured to determine a context for encoding the code predictive syntax element further based on whether the coding mode used to code the block of video data is an inter-predictive coding mode or an intra-predictive coding mode.

[0164]

[0172] In another example, the video encoder 200 is further configured to determine a context for encoding a sign predictive syntax element for the transform coefficient further based on the intra-prediction direction.

[0165]

[0173] 10 is a flowchart illustrating another example method for decoding a current block according to the techniques of this disclosure. The technique of FIG. 10 may be implemented by one or more structural units of a video decoder 300, including an entropy decoding unit 302.

[0166]

[0174] In one example of this disclosure, the video decoder 300 is configured to determine a context for decoding a sign prediction syntax element for the transform coefficient based on a position of the transform coefficient in a block of video data, where the sign prediction syntax element indicates whether a sign prediction hypothesis for the transform coefficient is correct (520). The video decoder 300 may then decode the sign prediction syntax element using the context (522).

[0167]

[0175] The video decoder 300 may be further configured to determine a sign prediction hypothesis for the transform coefficients (524). For example, the video decoder 300 may determine the sign prediction hypothesis by minimizing a cost function that includes the combined template values. The video decoder 300 may then determine signs of the transform coefficients based on the sign prediction hypothesis and the sign prediction syntax element (526) and decode the block of video data based on the signs of the transform coefficients (528).

[0168]

[0176] In one example, to determine a context for decoding a sign predictive syntax element for a transform coefficient based on a position of the transform coefficient in a block of video data, the video decoder 300 is further configured to determine a context for decoding a sign predictive syntax element for the transform coefficient based on whether the transform coefficient is a DC coefficient.

[0169]

[0177] In another example, to determine a context for decoding a sign predictive syntax element for a transform coefficient based on a position of the transform coefficient in a block of video data, the video decoder 300 is further configured to determine a first context for decoding the sign predictive syntax element based on the transform coefficient being a DC coefficient, and to determine a second context for decoding the sign predictive syntax element based on the transform coefficient being a DC coefficient.

[0170]

[0178] In another example, to determine a context for decoding a code predictive syntax element for a transform coefficient based on a position of the transform coefficient in the block of video data, the video decoder 300 is further configured to determine a context for decoding the code predictive syntax element based on a code predictive order in the block of video data, where the position of the transform coefficient in the block of video data is based on the code predictive order.

[0171]

[0179] In another example, the video decoder 300 is further configured to determine a context for decoding a sign predictive syntax element for the transform coefficient further based on the coding mode used to encode the block.

[0172]

[0180] In another example, to determine a context for decoding a code predictive syntax element for a transform coefficient further based on the coding mode, the video decoder 300 is further configured to determine a context for decoding the code predictive syntax element further based on whether the coding mode used to code the block of video data is an inter-predictive coding mode or an intra-predictive coding mode.

[0173]

[0181] In another example, the video decoder 300 is further configured to determine a context for decoding a sign predictive syntax element for the transform coefficient further based on the intra-prediction direction.

[0174]

[0182] Other exemplary aspects of the techniques and devices of this disclosure are described below.

[0175]

[0183] Aspect 1 - A method of decoding video data, the method comprising: determining a context for decoding a sign prediction syntax element for a transform coefficient based on a position of a transform coefficient in a block of the video data; and decoding the sign prediction syntax element using the context, where the sign prediction syntax element indicates whether a sign prediction hypothesis is correct for the transform coefficient.

[0176]

[0184] Aspect 2 - The method of aspect 1, wherein determining a context for decoding a sign predictive syntax element for a transform coefficient based on a position of the transform coefficient in a block of video data comprises determining a context for decoding a sign predictive syntax element for the transform coefficient based on whether the transform coefficient is a DC coefficient.

[0177]

[0185] Aspect 3 - The method of aspect 1, wherein determining a context for decoding a sign predictive syntax element for a transform coefficient based on a position of the transform coefficient in the block of video data comprises determining a first context for decoding the sign predictive syntax element based on the transform coefficient being a DC coefficient, and determining a second context for decoding the sign predictive syntax element based on the transform coefficient being a DC coefficient.

[0178]

[0186] Aspect 4 - The method of aspect 1, wherein determining a context for decoding a code predictive syntax element for a transform coefficient based on a position of the transform coefficient in the block of video data comprises determining a context for decoding the code predictive syntax element based on a code predictive order in the block of video data, wherein the position of the transform coefficient in the block of video data is based on the code predictive order.

[0179]

[0187] Aspect 5 - The method of aspect 1, further comprising determining a context for decoding a sign predictive syntax element for the transform coefficients further based on a coding mode used to code the block of video data.

[0180]

[0188] Aspect 6 - The method of aspect 5, wherein determining a context for decoding a code predictive syntax element for a transform coefficient further based on the coding mode comprises determining a context for decoding a code predictive syntax element further based on whether a coding mode used to code the block of video data is an inter-predictive coding mode or an intra-predictive coding mode.

[0181]

[0189] Aspect 7 - The method of aspect 1, further comprising determining a context for decoding a sign predictive syntax element for the transform coefficients further based on an intra prediction direction.

[0182]

[0190] Aspect 8 - The method of any of aspects 1 to 7, further comprising: determining a sign prediction hypothesis for the transform coefficient; determining a sign of the transform coefficient based on the sign prediction hypothesis and the sign prediction syntax element; and decoding the block of video data based on the sign of the transform coefficient.

[0183]

[0191] Aspect 9 - The method of aspect 8, wherein determining a sign prediction hypothesis for the transform coefficients comprises minimizing a cost function that includes the combined template values.

[0184]

[0192] Aspect 10 - The method of aspect 8, further comprising displaying a picture including the block of video data.

[0185]

[0193] Aspect 11 - An apparatus configured to decode video data, the apparatus comprising: a memory configured to store a block of video data; and one or more processors implemented in circuitry and in communication with the memory, the one or more processors configured to: determine a context for decoding a sign prediction syntax element for a transform coefficient based on a position of the transform coefficient in the block of video data; and decode the sign prediction syntax element using the context, where the sign prediction syntax element indicates whether a sign prediction hypothesis is correct for the transform coefficient.

[0186]

[0194] Aspect 12 - The apparatus of aspect 11, wherein, to determine a context for decoding a sign predictive syntax element for a transform coefficient based on a position of the transform coefficient in a block of video data, the one or more processors are further configured to determine a context for decoding a sign predictive syntax element for the transform coefficient based on whether the transform coefficient is a DC coefficient.

[0187]

[0195] Aspect 13 - The apparatus of aspect 11, wherein to determine a context for decoding a sign predictive syntax element for a transform coefficient based on a position of the transform coefficient in a block of video data, the one or more processors are further configured to determine a first context for decoding the sign predictive syntax element based on the transform coefficient being a DC coefficient, and to determine a second context for decoding the sign predictive syntax element based on the transform coefficient being a DC coefficient.

[0188]

[0196] Aspect 14 - The apparatus of aspect 11, wherein the one or more processors are further configured to determine a context for decoding a code predictive syntax element for a transform coefficient based on a position of the transform coefficient in the block of video data, based on a code predictive order in the block of video data, wherein the position of the transform coefficient in the block of video data is based on the code predictive order.

[0189]

[0197] Aspect 15 - The apparatus of aspect 11, further configured to: determine a context for decoding a sign predictive syntax element for a transform coefficient based further on a coding mode used to code the block of video data, the one or more processors.

[0190]

[0198] Aspect 16 - The apparatus of aspect 15, wherein to determine a context for decoding a code predictive syntax element for a transform coefficient further based on the coding mode, the one or more processors are further configured to determine a context for decoding the code predictive syntax element further based on whether a coding mode used to code the block of video data is an inter-predictive coding mode or an intra-predictive coding mode.

[0191]

[0199] Aspect 17 - The apparatus of aspect 11, wherein the one or more processors are further configured to determine a context for decoding a sign predictive syntax element for the transform coefficients further based on an intra prediction direction.

[0192]

[0200] Aspect 18 - The apparatus of any of aspects 11 to 17, wherein the one or more processors are further configured to determine a sign prediction hypothesis for the transform coefficients, determine signs of the transform coefficients based on the sign prediction hypothesis and the sign prediction syntax element, and decode the block of video data based on the signs of the transform coefficients.

[0193]

[0201] Aspect 19 -The apparatus of aspect 18, wherein the one or more processors are further configured to minimize a cost function that includes the combined template values ​​to determine a sign prediction hypothesis for the transform coefficients.

[0194]

[0202]

[0046] Aspect 20 - The apparatus of aspect 18, further comprising a display configured to display a picture including the block of video data.

[0195]

[0203] Aspect 21 - An apparatus configured to decode video data, the apparatus comprising: means for determining a context for decoding a sign prediction syntax element for a transform coefficient based on a position of the transform coefficient in a block of the video data; and means for decoding the sign prediction syntax element using the context, where the sign prediction syntax element indicates whether a sign prediction hypothesis is correct for the transform coefficient.

[0196]

[0204] Aspect 22 - The apparatus of aspect 21, wherein the means for determining a context for decoding a sign predictive syntax element for the transform coefficient based on a position of the transform coefficient in the block of video data comprises means for determining a context for decoding the sign predictive syntax element for the transform coefficient based on whether the transform coefficient is a DC coefficient.

[0197]

[0205] Aspect 23 - The apparatus of aspect 21, wherein the means for determining a context for decoding a sign predictive syntax element for a transform coefficient based on a position of the transform coefficient in a block of video data comprises: means for determining a first context for decoding the sign predictive syntax element based on the transform coefficient being a DC coefficient; and means for determining a second context for decoding the sign predictive syntax element based on the transform coefficient being a DC coefficient.

[0198]

[0206] Aspect 24 - The apparatus of aspect 21, wherein the means for determining a context for decoding a code predictive syntax element for a transform coefficient based on a position of the transform coefficient in the block of video data comprises means for determining a context for decoding the code predictive syntax element based on a code predictive order in the block of video data, wherein the position of the transform coefficient in the block of video data is based on the code predictive order.

[0199]

[0207] Example 25 - The apparatus of example 21, further comprising means for determining a context for decoding a sign predictive syntax element for the transform coefficients further based on a coding mode used to code the block of video data.

[0200]

[0208] Aspect 26 - The apparatus of aspect 25, wherein the means for determining a context for decoding a code predictive syntax element for a transform coefficient further based on the coding mode comprises means for determining a context for decoding the code predictive syntax element further based on whether a coding mode used to code the block of video data is an inter-predictive coding mode or an intra-predictive coding mode.

[0201]

[0209]

[0046] Example 27 - The apparatus of example 21, further comprising means for determining a context for decoding a sign predictive syntax element for the transform coefficient further based on an intra prediction direction.

[0202]

[0210] Aspect 28 - The apparatus of any of aspects 21 to 27, further comprising: means for determining a sign prediction hypothesis for the transform coefficient; means for determining a sign of the transform coefficient based on the sign prediction hypothesis and the sign prediction syntax element; and means for decoding the block of video data based on the sign of the transform coefficient.

[0203]

[0211]

[0071] Aspect 29 - The apparatus of aspect 28, wherein the means for determining a sign prediction hypothesis for the transform coefficients comprises means for minimizing a cost function including the combined template values.

[0204]

[0212]

[0046] The apparatus of embodiment 28, further comprising means for displaying a picture including the block of video data.

[0205]

[0213] Aspect 31 -A non-transitory computer-readable storage medium storing instructions that, when executed, cause one or more processors configured to decode video data to determine a context for decoding a sign prediction syntax element for a transform coefficient based on a position of the transform coefficient in a block of video data, and decode the sign prediction syntax element using the context, where the sign prediction syntax element indicates whether a sign prediction hypothesis is correct for the transform coefficient.

[0206]

[0214] Aspect 32 - A non-transitory computer-readable storage medium as described in aspect 31, wherein to determine a context for decoding a sign predictive syntax element for a transform coefficient based on a position of the transform coefficient in a block of video data, the instructions further cause one or more processors to determine a context for decoding a sign predictive syntax element for the transform coefficient based on whether the transform coefficient is a DC coefficient.

[0207]

[0215] Aspect 33 - A non-transitory computer-readable storage medium as described in aspect 31, wherein to determine a context for decoding a sign predictive syntax element for a transform coefficient based on a position of the transform coefficient in a block of video data, the instructions further cause the one or more processors to determine a first context for decoding the sign predictive syntax element based on the transform coefficient being a DC coefficient, and to determine a second context for decoding the sign predictive syntax element based on the transform coefficient not being a DC coefficient.

[0208]

[0216] Aspect 34 -A non-transitory computer-readable storage medium as described in aspect 31, wherein the instructions further cause one or more processors to determine a context for decoding a code predictive syntax element for a transform coefficient based on a position of the transform coefficient in the block of video data, wherein the position of the transform coefficient in the block of video data is based on the code predictive order.

[0209]

[0217] Aspect 35 -A non-transitory computer-readable storage medium as described in aspect 31, wherein the instructions further cause the one or more processors to determine a context for decoding a sign predictive syntax element for the transform coefficients further based on a coding mode used to code the block of video data.

[0210]

[0218] Aspect 36 - A non-transitory computer-readable storage medium as described in aspect 35, wherein to determine a context for decoding a code predictive syntax element for a transform coefficient further based on the coding mode, the instructions further cause the one or more processors to determine a context for decoding a code predictive syntax element further based on whether a coding mode used to code the block of video data is an inter-predictive coding mode or an intra-predictive coding mode.

[0211]

[0219] Aspect 37 -A non-transitory computer-readable storage medium as described in aspect 31, wherein the instructions further cause the one or more processors to determine a context for decoding a sign predictive syntax element for the transform coefficients further based on an intra prediction direction.

[0212]

[0220] Aspect 38 - A non-transitory computer-readable storage medium as described in any of aspects 31 to 37, wherein the instructions further cause one or more processors to determine a sign prediction hypothesis for the transform coefficient, determine a sign of the transform coefficient based on the sign prediction hypothesis and the sign prediction syntax element, and decode the block of video data based on the sign of the transform coefficient.

[0213]

[0221] Aspect 39 -A non-transitory computer-readable storage medium as described in aspect 38, wherein the instructions further cause the one or more processors to minimize a cost function including the combined template values ​​to determine a sign prediction hypothesis for the transform coefficients.

[0214]

[0222] Aspect 40 -The non-transitory computer-readable storage medium of aspect 38, wherein the instructions further cause the one or more processors to display a picture including the block of video data.

[0215]

[0223] Aspect 41 - An apparatus configured to encode video data, the apparatus comprising: a memory configured to store a block of video data; and one or more processors implemented in circuitry and in communication with the memory, the one or more processors configured to: determine a context for encoding a sign prediction syntax element for a transform coefficient based on a position of the transform coefficient in the block of video data; and encode the sign prediction syntax element using the context, where the sign prediction syntax element indicates whether a sign prediction hypothesis is correct for the transform coefficient.

[0216]

[0224] Aspect 42 - The apparatus described in aspect 41, wherein, to determine a context for encoding a sign predictive syntax element for the transform coefficient based on a position of the transform coefficient in a block of video data, the one or more processors are further configured to determine a context for encoding the sign predictive syntax element for the transform coefficient based on whether the transform coefficient is a DC coefficient.

[0217]

[0225] Aspect 43 - The apparatus of aspect 41, wherein to determine a context for encoding a sign predictive syntax element for a transform coefficient based on a position of the transform coefficient in a block of video data, the one or more processors are further configured to determine a first context for encoding the sign predictive syntax element based on the transform coefficient being a DC coefficient, and to determine a second context for encoding the sign predictive syntax element based on the transform coefficient being a DC coefficient.

[0218]

[0226] Aspect 44 - The apparatus of aspect 41, wherein the one or more processors are further configured to determine a context for encoding a code predictive syntax element for a transform coefficient based on a position of the transform coefficient in the block of video data, the context for encoding the code predictive syntax element being based on a code predictive order in the block of video data, wherein the position of the transform coefficient in the block of video data is based on the code predictive order.

[0219]

[0227] Example 45 - The apparatus of example 41, further configured to: determine a context for encoding a sign predictive syntax element for the transform coefficients based further on a coding mode used to code the block of video data.

[0220]

[0228] Aspect 46 - The apparatus described in aspect 45, wherein to determine a context for encoding a code predictive syntax element for a transform coefficient further based on the coding mode, the one or more processors are further configured to determine a context for encoding the code predictive syntax element further based on whether a coding mode used to code the block of video data is an inter-predictive coding mode or an intra-predictive coding mode.

[0221]

[0229] Aspect 47 - The apparatus of aspect 41, wherein the one or more processors are further configured to determine a context for encoding a sign predictive syntax element for the transform coefficients further based on an intra prediction direction.

[0222]

[0230] Aspect 48 - The apparatus of any of aspects 41 to 47, wherein the one or more processors are further configured to determine a sign of the transform coefficient and to determine a sign prediction hypothesis for the transform coefficient, wherein, to encode the sign prediction syntax element, the one or more processors are configured to encode the sign prediction using the context based on the sign of the transform coefficient and the sign prediction hypothesis.

[0223]

[0231] Aspect 49 -The apparatus of aspect 48, wherein the one or more processors are further configured to minimize a cost function including the combined template values ​​to determine a sign prediction hypothesis for the transform coefficients.

[0224]

[0232]

[0046] Aspect 50 -The apparatus of aspect 48, further comprising a camera configured to capture a picture including the block of video data.

[0225]

[0233] Aspect 51 -A method of coding video data, the method comprising: determining a context for coding a sign prediction for a transform coefficient based on a position of the transform coefficient; and coding the sign prediction using the determined context.

[0226]

[0234] Aspect 52 -The method of aspect 51, wherein the sign prediction is a bin that indicates whether the sign prediction hypothesis is correct for the transform coefficient.

[0227]

[0235] Aspect 53 - A method as described in any of aspects 51 to 52, wherein determining a context for coding a sign prediction for the transform coefficient based on the position of the transform coefficient comprises determining a first context for coding the sign prediction based on the transform coefficient being a DC coefficient, and determining a second context for coding the sign prediction based on the transform coefficient not being a DC coefficient.

[0228]

[0236] Aspect 54 - A method as described in any of aspects 51 to 52, wherein determining a context for coding a sign prediction for a transform coefficient based on a position of the transform coefficient comprises determining a context for coding the sign prediction based on a quadrant of a block that includes the transform coefficient.

[0229]

[0237] Aspect 55 - A method as described in any of aspects 51 to 52, wherein determining a context for coding a sign prediction for a transform coefficient based on a position of the transform coefficient comprises determining to use the same context for two transform coefficients having positional symmetry.

[0230]

[0238] Aspect 56 - A method as described in any of aspects 51 to 52, wherein determining a context for coding a sign prediction for the transform coefficient based on the position of the transform coefficient comprises determining a context for coding the sign prediction based on a sign prediction order.

[0231]

[0239] Aspect 57 -A method of coding video data, the method comprising: determining a context for coding a sign prediction for a transform coefficient based on a coding mode; and coding the sign prediction using the determined context.

[0232]

[0240] Aspect 58 -The method of aspect 57, wherein the sign prediction is a bin that indicates whether the sign prediction hypothesis is correct for the transform coefficient.

[0233]

[0241] Aspect 59 - A method as described in any of aspects 57 to 58, wherein determining a context for coding the symbol prediction comprises determining a context for coding the symbol prediction based on use of inter prediction or intra prediction for coding a block including transform coefficients.

[0234]

[0242] Example 60 - The method of any of examples 57 to 58, wherein determining a context for coding the symbol prediction comprises determining a context for coding the symbol prediction based on an intra prediction direction.

[0235]

[0243] Example 61 - The method of any of examples 57 to 58, wherein determining a context for coding the symbol prediction comprises determining a context for coding the symbol prediction based on a linear transform.

[0236]

[0244] Example 62 - The method of any of examples 57 to 58, wherein determining a context for coding the symbol prediction comprises determining a context for coding the symbol prediction based on a quadratic transform.

[0237]

[0245] Aspect 63 - The method of any of aspects 51 to 62, wherein the coding comprises decoding, wherein the method further comprises determining a sign prediction hypothesis for the transform coefficient, determining a sign of the transform coefficient based on the sign prediction hypothesis and the decoded sign prediction, and decoding the block of video data based on the determined sign.

[0238]

[0246] Aspect 64 - The method of any of aspects 51 to 62, wherein the coding comprises encoding, wherein the method further comprises determining a sign of the transform coefficient and determining a sign prediction hypothesis for the transform coefficient, wherein encoding the sign prediction comprises encoding the sign prediction using the determined context based on the sign of the transform coefficient and the sign prediction hypothesis.

[0239]

[0247]

[0046] A method according to any of aspects 63 to 64, wherein determining a sign prediction hypothesis for the transform coefficients comprises determining a sign prediction hypothesis by minimizing a cost function including combined template values.

[0240]

[0248] Embodiment 66 -The method of any combination of embodiments 51 to 65.

[0241]

[0249] A device for coding video data, the device comprising one or more means for performing the method described in any of aspects 51 to 66.

[0242]

[0250] Embodiment 68 -The device of embodiment 67, wherein the one or more means comprise one or more processors implemented in circuitry.

[0243]

[0251] Embodiment 69 - A device as described in any of embodiments 67 and 68, further comprising a memory for storing video data.

[0244]

[0252]

[0071] A device as described in any of aspects 67 to 69, further comprising a display configured to display the decoded video data.

[0245]

[0253] Aspect 71 - A device as described in any of aspects 67 to 70, wherein the device comprises one or more of a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box.

[0246]

[0254] A device according to any of aspects 67 to 71, wherein the device comprises a video decoder.

[0247]

[0255] A device according to any of aspects 67 to 72, wherein the device comprises a video encoder.

[0248]

[0256] Aspect 74 - A computer-readable storage medium having instructions stored thereon that, when executed, cause one or more processors to perform a method according to any of aspects 51 to 66.

[0249]

[0257] In accordance with the above examples, it should be appreciated that some acts or events of any of the techniques described herein may be performed in a different sequence, added, merged, or omitted entirely (e.g., not all described acts or events may be necessary to the practice of the techniques). Moreover, in some examples, acts or events may be performed simultaneously rather than sequentially, for example, through multi-threaded processing, interrupt processing, or multiple processors.

[0250]

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

[0251]

[0259] By way of example and not limitation, such computer-readable storage media may comprise 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 may be used to store desired program code in the form of instructions or data structures and that may be accessed by a computer. Also, any connection is properly referred to as a computer-readable medium. For example, if instructions are transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave, 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 transitory media, but instead cover 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 with lasers. Combinations of the above should also be included within the scope of computer readable media.

[0252]

[0260] The instructions may be executed by one or more processors, such as one or more DSPs, general-purpose microprocessors, ASICs, FPGAs, or other equivalent integrated circuits or discrete logic circuits. Thus, the terms "processor" and "processing circuitry" as used herein may refer to any of the above structures, or any other structures suitable for implementing the techniques described herein. Furthermore, in some aspects, the functionality described herein may be provided in dedicated hardware and / or software modules configured for encoding and decoding, or incorporated into a composite codec. Also, the techniques may be fully implemented in one or more circuits or logic elements.

[0253]

[0261] The techniques of the present disclosure may be implemented in a wide variety of devices or apparatuses, including wireless handsets, integrated circuits (ICs) or sets of ICs (e.g., chipsets). In this disclosure, various components, modules, or units have been described to highlight functional aspects of devices configured to implement the disclosed techniques, but those components, modules, or units do not necessarily require realization by different hardware units. Rather, as described above, the various units may be combined in a codec hardware unit or provided by a collection of interoperable hardware units, including one or more processors described above, along with suitable software and / or firmware.

[0254]

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

Claims

1. 1. A method for decoding video data, comprising the steps of: determining a context for decoding a sign prediction syntax element for the transform coefficient based on a position of the transform coefficient in a block of video data, wherein the sign prediction syntax element indicates whether a sign prediction hypothesis is correct for the transform coefficient, and a first context is determined for decoding the sign prediction syntax element if the transform coefficient is a DC coefficient, and a second context is determined for decoding the sign prediction syntax element if the transform coefficient is any coefficient other than a DC coefficient. decoding the code prediction syntax element using the context; and A method comprising:

2. determining the context for decoding the code predictive syntax elements for the transform coefficients further based on whether a coding mode used to encode the block is an inter-predictive coding mode or an intra-predictive coding mode; The method of claim 1 further comprising:

3. determining the context for decoding the sign predictive syntax element for the transform coefficient further based on an intra prediction direction; The method of claim 1 further comprising:

4. determining the sign prediction hypotheses for the transform coefficients; determining signs of the transform coefficients based on the sign prediction hypothesis and the sign prediction syntax element; decoding the block of video data based on the signs of the transform coefficients; The method of claim 1 further comprising:

5. Determining the sign prediction hypotheses for the transform coefficients includes: minimizing a cost function involving the combined template values; The method of claim 4 comprising:

6. displaying a picture including said block of video data; The method of claim 4 further comprising:

7. 1. An apparatus configured to decode video data, comprising: a memory configured to store blocks of video data; one or more processors implemented in circuitry and in communication with the memory; wherein the one or more processors: determining a context for decoding a sign prediction syntax element for the transform coefficient based on a position of the transform coefficient in the block of video data, wherein the sign prediction syntax element indicates whether a sign prediction hypothesis is correct for the transform coefficient, and a first context is determined for decoding the sign prediction syntax element if the transform coefficient is a DC coefficient, and a second context is determined for decoding the sign prediction syntax element if the transform coefficient is any coefficient other than a DC coefficient. decoding the code prediction syntax element using the context; and An apparatus configured to:

8. The one or more processors: determining the context for decoding the code predictive syntax elements for the transform coefficients further based on whether a coding mode used to encode the block is an inter-predictive coding mode or an intra-predictive coding mode; The apparatus of claim 7 , further configured to:

9. The one or more processors: determining the context for decoding the sign predictive syntax element for the transform coefficient further based on an intra prediction direction; The apparatus of claim 7 , further configured to:

10. The one or more processors: determining the sign prediction hypotheses for the transform coefficients; determining signs of the transform coefficients based on the sign prediction hypothesis and the sign prediction syntax element; decoding the block of video data based on the signs of the transform coefficients; The apparatus of claim 7 , further configured to:

11. To determine the sign prediction hypotheses for the transform coefficients, the one or more processors minimizing a cost function involving the combined template values; The apparatus of claim 10 , further configured to:

12. a display configured to display a picture including said blocks of video data; The apparatus of claim 11 further comprising:

13. The apparatus of claim 7 , wherein the apparatus is a wireless communication device.

14. 1. An apparatus configured to encode video data, comprising: a memory configured to store blocks of video data; one or more processors implemented in circuitry and in communication with the memory; wherein the one or more processors: determining a context for encoding a sign prediction syntax element for the transform coefficient based on a position of the transform coefficient in the block of video data, wherein the sign prediction syntax element indicates whether a sign prediction hypothesis is correct for the transform coefficient, and a first context is determined for decoding the sign prediction syntax element if the transform coefficient is a DC coefficient, and a second context is determined for decoding the sign prediction syntax element if the transform coefficient is any coefficient other than a DC coefficient. encoding the code prediction syntax element using the context; and An apparatus configured to:

15. A computer-readable storage medium storing instructions that, when executed by one or more processors, cause the one or more processors to perform a method according to any one of claims 1 to 6.