[go: up one dir, main page]

HK1202741B - Deriving context for last position coding for video coding - Google Patents

Deriving context for last position coding for video coding Download PDF

Info

Publication number
HK1202741B
HK1202741B HK15103086.2A HK15103086A HK1202741B HK 1202741 B HK1202741 B HK 1202741B HK 15103086 A HK15103086 A HK 15103086A HK 1202741 B HK1202741 B HK 1202741B
Authority
HK
Hong Kong
Prior art keywords
value
video
block
context
bin
Prior art date
Application number
HK15103086.2A
Other languages
Chinese (zh)
Other versions
HK1202741A1 (en
Inventor
郭立威
马尔塔‧卡切维奇
钱威俊
Original Assignee
高通股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from US13/796,572 external-priority patent/US9237344B2/en
Application filed by 高通股份有限公司 filed Critical 高通股份有限公司
Publication of HK1202741A1 publication Critical patent/HK1202741A1/en
Publication of HK1202741B publication Critical patent/HK1202741B/en

Links

Description

Deriving context for last position coding for video coding
The present application claims the benefits of U.S. provisional application No. 61/614,178 filed on 3/22/2012, U.S. provisional application No. 61/620,273 filed on 4/2012, and U.S. provisional application No. 61/666,316 filed on 6/29/2012, the entire contents of each of which are hereby incorporated herein by reference.
Technical Field
The present disclosure relates to video coding.
Background
Digital video capabilities can be incorporated into a wide range of devices, including digital televisions, digital direct broadcast systems, wireless broadcast systems, Personal Digital Assistants (PDAs), laptop or desktop computers, tablet computers, electronic book readers, digital cameras, digital recording devices, digital media players, video gaming devices, video game consoles, cellular or satellite radio telephones, so-called "smart phones," video teleconferencing devices, video streaming devices, and the like. Digital video devices implement video coding techniques such as those described in the standards defined by MPEG-2, MPEG-4, ITU-T H.263, ITU-T H.264/MPEG-4 part 10 Advanced Video Coding (AVC), the High Efficiency Video Coding (HEVC) standard currently under development, and extensions of these standards. Video devices may transmit, receive, encode, decode, and/or store digital video information more efficiently by implementing these video coding techniques.
Video coding techniques include spatial (intra-picture) prediction and/or temporal (inter-picture) prediction to reduce or remove redundancy inherent in video sequences. For block-based video coding, a video slice (e.g., a video frame or a portion of a video frame) may be partitioned into video blocks (which may also be referred to as treeblocks), Coding Units (CUs) and/or coding nodes. Video blocks in an intra-coded (I) slice of a picture may be 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.
Spatial prediction or temporal prediction results in a predictive block for the block to be coded. The residual data represents pixel differences between the original block to be coded and the predictive block. An inter-coded block is encoded according to a motion vector that points to a block of reference samples that forms a predictive block, and residual data that indicates a difference between the coded block and the predictive block. The intra-coded block is encoded according to the intra-coding mode and the residual data. For further compression, the residual data may be transformed from the pixel domain to the transform domain, resulting in residual transform coefficients, which may then be quantized. The quantized transform coefficients, initially arranged in a two-dimensional array, may be scanned in order to generate a one-dimensional vector of transform coefficients, and entropy coding may be applied to achieve even more compression.
Disclosure of Invention
In general, techniques are described for coding syntax elements associated with video data using one or more functions. For example, a device may implement one or more of the techniques to code a value indicating the position of the last significant coefficient of a block (e.g., transform unit or "TU") of video data. To code the value, the device may use a function of an index corresponding to each bit (or "bin") in a binarized value of the last significant coefficient, where the index indicates the location of the bin in a binary array representing the binarized value.
In one example, a method includes determining a context for entropy coding a bin of values indicative of a last significant coefficient of a block of video data using a function of an index of the bin, and coding the bin using the determined context.
In another example, a device for coding video data includes a video coder configured to determine a context for entropy coding a bin of values indicative of a last significant coefficient of a block of video data using a function of an index of the bin, and code the bin using the determined context.
In another example, a method includes determining a context for entropy coding a bin of values indicative of a last significant coefficient of a block of video data using a function of an index of the bin, and coding the bin using the determined context.
In another example, a computer-readable storage medium is encoded with instructions. When executed, the instructions cause a programmable processor of a computing device to determine a context for entropy coding a bin of values indicative of a last significant coefficient of a block of video data using a function of an index of the bin, and code the bin using the determined context.
The details of one or more examples are set forth in the accompanying drawings and the description below. Other features, objects, and advantages will be apparent from the description and drawings, and from the claims.
Drawings
Fig. 1 is a block diagram illustrating an example video encoding and decoding system that may utilize techniques for determining a context used to code a value representing a last significant coefficient of a block of video data.
Fig. 2 is a block diagram illustrating an example of a video encoder that may implement techniques for determining a context used to code a value representing a last significant coefficient of a block of video data.
Fig. 3 is a block diagram illustrating an example of a video decoder that may implement techniques for determining a context used to code a value representing a last significant coefficient of a block of video data.
Fig. 4 is a flow diagram illustrating an example method for encoding a current block of video data.
Fig. 5 is a flow diagram illustrating an example method for decoding a current block of video data.
Detailed Description
The techniques of this disclosure relate generally to video coding. In video coding, a series of pictures are individually coded using spatial prediction (intra-prediction) or temporal prediction (inter-prediction). In particular, video coders code individual blocks of a picture using either intra-prediction or inter-prediction. The video coder also codes residual data for a block, wherein the residual data substantially corresponds to a residual block that represents a pixel-by-pixel difference between predicted data and original uncoded data. The video coder may transform and quantize the residual data to generate quantized transform coefficients for the residual block. The video coder further codes syntax data such as whether the coefficient is significant (e.g., has an absolute value greater than zero), the position of the significant coefficient, the position of the last significant coefficient in the scan order, and the level value of the significant coefficient.
This disclosure describes techniques for coding a value indicative of a last significant coefficient in a block of video data, such as a Transform Unit (TU). In particular, to code a syntax element such as a value indicating a last significant coefficient in a block, a video coder may be configured to apply Context Adaptive Binary Arithmetic Coding (CABAC). CABAC coding involves the use of various contexts, indicated by context indices, that generally indicate the likelihood that individual bits (or "binaries") of a binarized string will have a particular value (e.g., 0 or 1). In particular, the context used to code the bin of a value indicating the last significant coefficient in a block is determined individually for each bin of the value, i.e., based on the location of the bin in the value (e.g., the index of the bin, assuming the value is represented as an array of bins).
Rather than using a mapping table, which provides an indication of context indices for coding contexts of a particular bin, the techniques of this disclosure include using a function to determine the context index of the context used to code the bin. In particular, the function may be a function of an index of a binary. For example, assuming a bin is the ith bin of the coded value, the function may be defined as f (i), where f (i) returns a context index value corresponding to the context of bin i that will be used to code the binarized value. The context as described above may indicate a likelihood that a binary i will have a particular value (e.g., 0 or 1).
In this manner, this disclosure describes CABAC coding techniques for the last significant digit position (last position). For the last position bin to be encoded, the index of its CABAC context can be derived using a function so that the mapping table (e.g., not stored) between the last position bin and the CABAC context can be saved. CABAC coding generally includes two parts: binarization and CABAC coding. A binarization process is performed to convert the position of the last significant coefficient of a block into a binary string, e.g., an array of binaries. The binarization method used in the high efficiency video coding test model (HM) is truncated unary + fixed length coding. For truncated unary code portions, the binary is coded using CABAC contexts. For fixed length parts, the binary is coded using bypass mode (without context). An example of a 32 x 32TU (transform unit/transform block) is shown in table 1 below.
TABLE 1
Table 2 below illustrates an example context map for use in a conventional HM. Table 2 shows that the last location at a different location may share the same context. For some bins, e.g., bins 6-7 of an 8 x 8 block, no context is assigned because, as shown in table 1 above, the bins are encoded without using context (bypass mode).
TABLE 2
Binary index 0 1 2 3 4 5 6 7 8 9
TU4×4 0 1 2
TU8×8 3 4 5 5 2
TU16×16 6 7 8 8 9 9 2
TU32×32 10 11 12 14 13 13 14 14 2
Although conventional HMs use tables such as table 2 to determine a context for coding the binary of the last position value (i.e., a value indicating the last significant coefficient position in a block of video data), the techniques of this disclosure include using a function to determine a context for coding the binary of the last position value. Thus, tables like Table 2 are not required in video coders configured in accordance with the techniques of this disclosure. In this way, the function may be used to derive the CABAC context index for the bin in the last position coding, so that the mapping table (table 2) may be removed. Various examples of coding devices configured to perform functions to determine contexts for coding binaries of syntax elements are described in more detail below.
Fig. 1 is a block diagram illustrating an example video encoding and decoding system 10 that may utilize techniques for determining a context used to code a value representing a last significant coefficient of a block of video data. As shown in fig. 1, system 10 includes a source device 12 that provides encoded video data that is later decoded by a destination device 14. In particular, source device 12 provides video data to destination device 14 via computer-readable medium 16. Source device 12 and destination device 14 may comprise any of a wide range of devices, including desktop computers, notebook (i.e., laptop) computers, tablet computers, set-top boxes, telephone handsets such as so-called "smart" handsets, so-called "smart" pads, televisions, video cameras, display devices, digital media players, video game consoles, video streaming devices, or the like, in some cases, source device 12 and destination device 14 may be equipped for wireless communication.
Destination device 14 may receive encoded video data to be decoded via computer-readable medium 16. Computer-readable medium 16 may include any type of medium or device capable of moving encoded video data from source device 12 to destination device 14. In one example, computer-readable medium 16 may comprise a communication medium to enable source device 12 to transmit encoded video data directly to destination device 14 in real-time. The encoded video data may be modulated according to a communication standard, such as a wireless communication protocol, and transmitted to destination device 14. 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 used to facilitate communication from source device 12 to destination device 14.
In some examples, the encoded data may be output from output interface 22 to a storage device. Similarly, the encoded data may be accessed from the storage device through the input interface. The storage device may include any of a variety of distributed or locally accessed data storage media such as a hard drive, blu-ray discs, DVDs, CD-ROMs, flash memory, volatile or non-volatile memory, or any other suitable digital storage media for storing encoded video data. In yet another example, the storage device may correspond to a file server or to another intermediate storage device that may store the encoded video generated by source device 12. Destination device 14 may access the stored video data from the storage device via streaming or download. The file server may be any type of server capable of storing encoded video data and transmitting that encoded video data to destination device 14. Example file servers include web servers (e.g., for a website), FTP servers, Network Attached Storage (NAS) devices, or local disk drives. Destination device 14 may access the encoded video data through any standard data connection, including an internet connection. Such a data connection may include a wireless channel (e.g., a Wi-Fi connection), a wired connection (e.g., DSL, cable modem, etc.), or a combination of both, suitable for accessing encoded video data stored on a file server. The transmission of the encoded video data from the storage device may be a streaming transmission, a download transmission, or a combination thereof.
The techniques of this disclosure are not necessarily limited to wireless applications or settings. The techniques may be applied to video coding in support of any of a variety of multimedia applications, such as: over-the-air television broadcasts, cable television transmissions, satellite television transmissions, internet streaming video transmissions such as dynamic adaptive streaming over HTTP (DASH), digital video encoded onto a data storage medium, decoding of digital video stored on a data storage medium, or other applications. In some examples, system 10 may be configured to support one-way or two-way video transmission to support applications such as video streaming, video playback, video broadcasting, and/or video telephony.
In the example of fig. 1, source device 12 includes a video source 18, a video encoder 20, and an output interface 22. Destination device 14 includes input interface 28, video decoder 30, and display device 32. In accordance with this disclosure, video encoder 20 of source device 12 may be configured to apply techniques for determining a context used to code a value representing a last significant coefficient of a block of video data. In other examples, the source device and destination device may include other components or arrangements. For example, source device 12 may receive video data from an external video source 18 (e.g., an external camera). Likewise, destination device 14 may interface with an external display device, rather than including an integrated display device.
The illustrated system 10 of fig. 1 is merely an example. The techniques for determining a context for coding a value representing a last significant coefficient of a block of video data may be performed by any digital video encoding and/or decoding device. Although the techniques of this disclosure are generally performed by a video encoding device, the techniques may also be performed by a video encoder/decoder, commonly referred to as a "CODEC". Furthermore, the techniques of this disclosure may also be performed by a video preprocessor. Source device 12 and destination device 14 are merely examples of these coding devices in which source device 12 generates coded video data for transmission to destination device 14. In some examples, devices 12, 14 may operate in a substantially symmetric manner such that each of devices 12, 14 includes video encoding and decoding components. Thus, system 10 may support one-way or two-way video transmission between video devices 12, 14, e.g., for video streaming, video playback, video broadcasting, or video telephony.
Video source 18 of source device 12 may include a video capture device such as a video camera, a video archive containing previously captured video, and/or a video feed interface to receive video from a video content provider. As another alternative, video source 18 may generate computer graphics-based data as the source video, or generate a combination of live video, archived video, and computer-generated video. In some cases, if video source 18 is a video camera, source device 12 and destination device 14 may form so-called camera phones or video phones. However, as mentioned above, the techniques described in this disclosure may be applicable to video coding in general, and may be applied to wireless and/or wired applications. In each case, the captured, pre-captured, or computer-generated video may be encoded by video encoder 20. The encoded video information may then be output by output interface 22 onto computer-readable medium 16.
Computer-readable medium 16 may include transitory media such as a wireless broadcast or a wired network transmission; or a storage medium (i.e., a non-transitory storage medium) such as a hard disk, a flash drive, a compact disk, a digital versatile disk, a blu-ray disk, or other computer-readable medium. In some examples, a network server (not shown) may receive encoded video data from source device 12 and provide the encoded video data to destination device 14, e.g., via network transmission. Similarly, a computing device of a media production facility (e.g., a disc stamping facility) may receive encoded video data from source device 12 and generate a disc containing the encoded video data. Thus, in various examples, computer-readable medium 16 may be understood to include one or more computer-readable media in various forms.
Input interface 28 of destination device 14 receives information from computer-readable medium 16. The information of computer-readable medium 16 may include syntax information defined by video encoder 20, also used by video decoder 30, that includes syntax elements that describe the characteristics and/or processing of blocks and other coded units, such as GOPs. Display device 32 displays the decoded video data to a user, and may comprise any of a variety of display devices, such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), a plasma display, an Organic Light Emitting Diode (OLED) display, or another type of display device.
Video encoder 20 and video decoder 30 may operate according to a video coding standard, such as the High Efficiency Video Coding (HEVC) standard currently under development, and may conform to the HEVC test model (HM). Alternatively, video encoder 20 and video decoder 30 may operate according to, for example, the ITU-T H.264 standard, other proprietary or industry standards alternatively referred to as MPEG-4 part 10 Advanced Video Coding (AVC), or extensions of these standards. However, the techniques of this disclosure are not limited to any particular coding standard. Other examples of video coding standards include MPEG-2 and ITU-T H.263. Although not shown in fig. 1, in some aspects, video encoder 20 and video decoder 30 may each be integrated with an audio encoder and decoder, and may include appropriate MUX-DEMUX units or other hardware and software to handle encoding of both audio and video in a common data stream or separate data streams. The MUX-DEMUX unit may conform to the ITU H.223 multiplexer protocol or other protocols such as the User Datagram Protocol (UDP), if applicable.
The ITU-T H.264/MPEG-4(AVC) standard is formulated by the ITU-T Video Coding Experts Group (VCEG), along with the ISO/IEC Motion Picture Experts Group (MPEG), as a product of collective collaboration known as the Joint Video Team (JVT). In some aspects, the techniques described in this disclosure may be applied to devices that substantially conform to the h.264 standard. The h.264 standard is described by the ITU-T research group in the ITU-T recommendation h.264 (advanced video coding for general audio visual services) at 3 months 2005, which may be referred to herein as the h.264 standard or the h.264 specification, or the h.264/AVC standard or specification. The Joint Video Team (JVT) continues to work on extensions to H.264/MPEG-4 AVC.
Video encoder 20 and video decoder 30 may each be implemented as any of a variety of suitable encoder circuits, such as one or more microprocessors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs), discrete logic, software, hardware, firmware or any combinations thereof. When the techniques are implemented in part in software, a device may store instructions for the software in a suitable non-transitory computer-readable medium and execute the instructions in hardware using one or more processors to perform the techniques of this disclosure. Each of video encoder 20 and video decoder 30 may be included in one or more encoders or decoders, either of which may be integrated as part of a combined encoder/decoder (CODEC) in the respective device.
JCT-VC is working on the development of the HEVC standard. HEVC standardization efforts are based on an evolution model of the video coding device, referred to as the HEVC test model (HM). The HM assumes several additional capabilities of the video coding device relative to existing devices in accordance with, for example, ITU-T H.264/AVC. For example, h.264 provides nine intra-prediction encoding modes, while HM may provide up to thirty-three intra-prediction encoding modes.
In general, the working model of the HM describes that a video frame or picture may be divided into a series of treeblocks or Largest Coding Units (LCUs) that include both luma and chroma samples. Syntax data within the bitstream may define a size of the LCU, which is the largest coding unit in terms of the number of pixels. A slice includes a number of consecutive treeblocks in coding order. A video frame or picture may be partitioned into one or more slices. Each tree block may be split into Coding Units (CUs) according to a quadtree. In general, each CU in a quadtree data structure includes one node, where the root node corresponds to a tree block. If a CU is split into four sub-CUs, the node corresponding to the CU includes four leaf nodes, each of the leaf nodes corresponding to one of the sub-CUs.
Each node in the quad-tree data structure may provide syntax data for a corresponding CU. For example, a node in a quadtree may include a split flag that indicates whether the CU corresponding to the node is split into sub-CUs. Syntax elements for a CU may be defined recursively, and syntax elements for a CU may depend on whether the CU is split into sub-CUs. If a CU is not further split, it is called a leaf CU. In the present invention, four sub-CUs of a leaf CU will be referred to as leaf CUs even if there is no significant splitting of the original leaf CU. For example, if a CU of size 16 × 16 is not further split, then the four 8 × 8 sub-CUs will also be referred to as leaf CUs, even though the 16 × 16CU is never split.
A CU has a similar purpose to a macroblock of the h.264 standard, except that the CU has no size difference. For example, a tree-type block may be split into four child nodes (also referred to as child CUs), and each child node may in turn be a parent node and split into four other child nodes. The final, non-split child node, referred to as a leaf node of the quadtree, includes a coding node, also referred to as a leaf-CU. Syntax data associated with a coded bitstream may define a maximum number of splittable treeblocks, referred to as a maximum CU depth, and may also define a minimum size for the coding node. Thus, the bitstream may also define a minimum coding unit (SCU). This disclosure uses the term "block" to refer to any of a CU, PU, or TU in the content context of HEVC, or similar data structures in the content context of other standards (e.g., macroblocks and sub-blocks thereof in h.264/AVC).
A CU includes a coding node and a number of Prediction Units (PUs) and Transform Units (TUs) associated with the coding node. The size of a CU corresponds to the size of the coding node, and the shape must be square. The size of a CU may range from 8 × 8 pixels up to the size of a tree-type block with a maximum of 64 × 64 pixels or larger than 64 × 64 pixels. Each CU may contain one or more PUs and one or more TUs. Syntax data associated with a CU may describe, for example, partitioning of the CU to one or more PUs. The partition mode may be different between CU being skipped or direct mode encoded, intra prediction mode encoded, or inter prediction mode encoded. The PU may be segmented into non-square shapes. Syntax data associated with a CU may also describe partitioning the CU into one or more TUs, e.g., according to a quadtree. The TU may be square or non-square (e.g., rectangular) in shape.
The HEVC standard allows for a transform according to a TU, which may be different for different CUs. TU sizes are typically set based on the size of PUs within a given CU defined for a partitioned LCU, but this may not always be the case. TUs are typically the same size as a PU, or smaller than a PU. In some examples, residual samples corresponding to a CU may be subdivided into smaller units using a quadtree structure known as a "residual quadtree" (RQT). The leaf nodes of the RQT may be referred to as Transform Units (TUs). The pixel difference values associated with the TUs may be transformed to produce transform coefficients, which may be quantized.
A leaf CU may include one or more Prediction Units (PUs). In general, a PU represents a spatial region corresponding to all or a portion of a corresponding CU, and may include data for retrieving a reference sample for the PU. In addition, the PU contains data related to prediction. For example, when a PU is intra-mode encoded, data for the PU may be included in a Residual Quadtree (RQT), which may include data describing an intra-prediction mode for a TU corresponding to the PU. As another example, when a PU is inter-mode encoded, the PU may include data defining one or more motion vectors for the PU. The data defining the motion vector for the PU may describe, for example, a horizontal component of the motion vector, a vertical component of the motion vector, a resolution of the motion vector (e.g., one-quarter pixel precision or one-eighth pixel precision), a reference picture to which the motion vector points, and/or a reference picture list for the motion vector (e.g., list 0, list 1, or list C).
A leaf-CU having one or more PUs may also include one or more Transform Units (TUs). Transform units may be specified using RQTs (also referred to as TU quadtree structures), as discussed above. For example, the split flag may indicate whether a leaf CU is split into four transform units. Each transform unit may then be further split into other sub-TUs. When a TU is not further split, it may be referred to as a leaf-TU. In general, for intra coding, all leaf-TUs belonging to a leaf-CU share the same intra prediction mode. That is, the same intra-prediction mode is applied in general to compute the prediction values for all TUs of a leaf-CU. For intra coding, a video encoder may calculate a residual value for each leaf-TU that uses an intra-prediction mode as a difference between the portion of the CU corresponding to the TU and the original block. TUs are not necessarily limited to the size of a PU. Therefore, TU may be larger or smaller than PU. For intra coding, a PU may be collocated with a corresponding leaf-TU for the same CU. In some examples, the maximum size of a leaf-TU may correspond to the size of the corresponding leaf-CU.
Furthermore, the TUs of a leaf CU may also be associated with a respective quadtree data structure, referred to as a Residual Quadtree (RQT). That is, a leaf-CU may include a quadtree that indicates how the leaf-CU is partitioned into TUs. The root node of a TU quadtree generally corresponds to a leaf CU, while the root node of a CU quadtree generally corresponds to a tree block (or LCU). The non-split TU of the RQT is called a leaf-TU. In general, the terms CU and TU are used by this disclosure to refer to leaf-CU and leaf-TU, respectively, unless otherwise indicated.
A video sequence typically comprises a series of video frames or pictures. A group of pictures (GOP) typically includes a series of one or more video pictures. The GOP may include syntax data describing the number of pictures included in the GOP in a header of the GOP, a header of one or more of the pictures, or elsewhere. Each slice of a picture may include slice syntax data that describes an encoding mode of the respective slice. Video encoder 20 typically operates on video blocks within individual video slices in order to encode the video data. The video block may correspond to a coding node within a CU. Video blocks may have fixed or varying sizes, and may differ in size according to a specified coding standard.
As an example, the HM supports prediction at various PU sizes. Assuming that the size of a particular CU is 2 nx 2N, the HM supports intra prediction with PU sizes of 2 nx 2N or N × N, and inter prediction with symmetric PU sizes of 2 nx 2N, 2 nx N, N × 2N, or N × N. The HM also supports asymmetric partitioning for inter prediction with PU sizes of 2N × nU, 2N × nD, nL × 2N, and nR × 2N. In asymmetric partitioning, one direction of a CU is not partitioned, while the other direction is partitioned into 25% and 75%. The portion of the CU corresponding to the 25% partition is indicated by an indication of "n" followed by "Up", "Down", "Left", or "Right". Thus, for example, "2N × nU" refers to a 2N × 2N CU that is horizontally split to have a top 2N × 0.5N PU and a bottom 2N × 1.5N PU.
In this disclosure, "nxn" and "N by N" are used interchangeably to refer to the pixel size of a video block in the vertical and horizontal dimensions, e.g., 16 x 16 pixels or 16 by 16 pixels. In general, a 16 × 16 block will have 16 pixels in the vertical direction (y ═ 16) and 16 pixels in the horizontal direction (x ═ 16). Likewise, an nxn block typically has N pixels in the vertical direction and N pixels in the horizontal direction, where N represents a non-negative integer value. The pixels in a block may be arranged in rows and columns. Furthermore, the block does not necessarily need to have the same number of pixels in the horizontal direction as in the vertical direction. For example, a block may comprise N × M pixels, where M is not necessarily equal to N.
After intra-predictive coding or inter-predictive coding using PUs of the CU, video encoder 20 may calculate residual data for the TUs of the CU. A PU may comprise syntax data that describes a method or mode of generating predictive pixel data in the spatial domain, also referred to as the pixel domain, and a TU may comprise coefficients in the transform domain after applying a transform, such as a Discrete Cosine Transform (DCT), an integer transform, a wavelet transform, or a conceptually similar transform, to residual video data. The residual data may correspond to pixel differences between pixels of the unencoded picture and prediction values corresponding to the PU. Video encoder 20 may form TUs that include the residual data of the CU and then transform the TUs to generate transform coefficients for the CU.
After applying any transform to generate transform coefficients, video encoder 20 may perform quantization of the transform coefficients. Quantization generally refers to the process of: transform coefficients are quantized to possibly reduce the amount of data used to represent the coefficients, providing further compression. The quantization process may reduce the bit depth associated with some or all of the coefficients. For example, an n-bit value may be reduced to an m-bit value during quantization, where n is greater than m.
After quantization, the video encoder may scan the transform coefficients, producing 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) coefficients at the front of the array and lower energy (and therefore higher frequency) coefficients at the back of the array. In some examples, video encoder 20 may utilize a predefined scan order to scan the quantized transform coefficients to generate a serialized vector that may be entropy encoded. In other examples, video encoder 20 may perform adaptive scanning. After scanning the quantized transform coefficients to form a one-dimensional vector, video encoder 20 may entropy encode the one-dimensional vector, e.g., according to Context Adaptive Variable Length Coding (CAVLC), Context Adaptive Binary Arithmetic Coding (CABAC), syntax-based context adaptive binary arithmetic coding (SBAC), Probability Interval Partitioning Entropy (PIPE) coding, or another entropy encoding method. Video encoder 20 may also entropy encode syntax elements associated with the encoded video data for use by video decoder 30 in decoding the video data.
To perform CABAC, video encoder 20 may assign a context within the context model to a symbol to be transmitted. The context may relate to, for example, whether adjacent values of a symbol are non-zero. To perform CAVLC, video encoder 20 may select a variable length code for a symbol to be transmitted. Codewords in VLC may be constructed such that relatively shorter codes correspond to more likely symbols, while longer codes correspond to less likely symbols. In this way, bit savings may be achieved using VLC (compared to, for example, using equal length codewords for each symbol to be transmitted). The probability determination may be made based on the context assigned to the symbol.
In accordance with the techniques of this disclosure, video encoder 20 may encode a value representing a position of a last significant coefficient of a block of video data using a context determined using one or more functions of a binary of the value. Likewise, video decoder 30 may decode a value representing the last significant coefficient of a block of video data using a context determined using one or more functions of a binary of the value. Video encoder 20 and/or video decoder 30 may be configured to perform any of functions (1) - (12), or conceptually similar functions, described in more detail below, to perform the techniques of this disclosure. In this manner, video encoder 20 and video decoder 30 represent examples of a video coder configured to determine a context for entropy coding a bin of values indicative of a last significant coefficient of a block of video data using a function of an index of the bin, and code the bin using the determined context.
As an example, "Ctx _ i" may represent an index of a context used by video encoder 20 to encode the ith bin in the "last position" binary string. Video encoder 20 may derive Ctx _ i using the following process:
Ctx_i=f(i)。
the function represented by f (i) may be linear or non-linear. Additionally, f (i) may be a predefined function that may be used by both video encoder 20 and video decoder 30. Alternatively, f (i) may be selected by a user or by video encoder 20, and may be transmitted to video decoder 30 using one or more types of high-level syntax signaling, such as a Sequence Parameter Set (SPS), a Picture Parameter Set (PPS), an Adaptation Parameter Set (APS), a frame header, a slice header, a sequence header, or other such syntax signaling. An example of one such function that video encoder 20 may perform is:
f(i)=(i>>1), (1)
where ">" represents a binary right shift operator. Next, the result of f (i) may correspond to Ctx _ i. That is, video encoder 20 may execute f (i) to produce an output equal to the value of Ctx _ i. More particularly, video encoder 20 may perform f (i) to generate a context index used to entropy code the context of the ith bin.
Table 3 below illustrates an example of context indices that video encoder 20 may use to code bins at various bin indices at various block (e.g., TU) sizes using the example function (1) described above. Although table 3 is provided for purposes of explaining the results of example function (1), it will be appreciated that tables such as table 3 need not be stored in video coding devices such as source device 12 and/or destination device 14. Instead, one or both of video encoder 20 and video decoder 30 may perform function (1) above based on various binary indices to produce the results indicated in table 3.
TABLE 3
Binary index 0 1 2 3 4 5 6 7 8 9
TU4×4 0 0 1
TU8×8 0 0 1 1 2
TU16×16 0 0 1 1 2 2 3
TU32×32 0 0 1 1 2 2 3 3 4
As another example, video encoder 20 may perform a function that depends on both the binary index (i) and the size of the corresponding block (e.g., TU). The corresponding block may be the block that includes the coefficient described by the last significant coefficient value. As an example, the context index may be generated by a function, such as:
ctx _ i ═ f (i, TUBlkSize), where "TUBlkSize" is a value indicating the block size. For the purposes of this disclosure, the terms "tubuksize" and "block _ size" are used interchangeably to indicate block size.
As an example, the function may be:
f(i,TUBlkSize)=i>>(log2(TUBlkSize)-2)。 (2)
table 4 below illustrates an example of context indices that video encoder 20 will use to code bins at various bin indices at various block (e.g., TU) sizes using example function (2). Although table 4 is provided for purposes of explaining the results of example function (2), it will be appreciated that tables such as table 4 need not be stored in video coding devices such as source device 12 and/or destination device 14. Instead, one or both of video encoder 20 and video decoder 30 may perform the example function (2) described above to produce the results indicated in table 4.
TABLE 4
Binary index 0 1 2 3 4 5 6 7 8 9
TU4×4 0 1 2
TU8×8 0 0 1 1 2
TU16×16 0 0 0 0 1 1 1
TU32×32 0 0 0 0 0 0 0 0 1
As another example, video encoder 20 may perform the following function to derive Ctx _ i:
f (i, TuBlkSize) ═ i > 1+ TUSIZEoffset, where
TUSIZEoffset=(log2(TUBlkSize)-2)*(log2(TUBlkSize)+1)/2。 (3)
Table 5 below illustrates an example of context indices that video encoder 20 may use to code bins at various bin indices at various block (e.g., TU) sizes using an example function (3). Although table 5 is provided for purposes of explaining the results of example function (3), it will be appreciated that tables such as table 5 need not be stored in source device 12 and/or destination device 14. Instead, one or both of video encoder 20 and video decoder 30 may perform the example function (3) described above to produce the results indicated in table 5.
TABLE 5
Binary index 0 1 2 3 4 5 6 7 8 9
TU4×4 0 0 1
TU8×8 2 2 3 3 4
TU16×16 5 5 6 6 7 7 8
TU32×32 9 9 10 10 11 11 12 12 13
As yet another example, video encoder 20 may perform the following function to derive Ctx _ i:
ctx _ idx ═ i +1 > 1+ TUSIZEoffset, where
TUSIZEoffset=(log2(TUBlkSize)-2)*(log2(TUBlkSize)+1)/2。 (4)
Table 6 below illustrates an example of context indices that video encoder 20 may use to code bins at various bin indices at various block (e.g., TU) sizes using an example function (4). Although table 6 is provided for purposes of explaining the results of the functions, it will be appreciated that tables such as table 6 need not be stored in video coding devices such as source device 12 and/or destination device 14. Instead, one or both of video encoder 20 and video decoder 30 may perform the example function (4) described above to produce the results indicated in table 6.
TABLE 6
Binary index 0 1 2 3 4 5 6 7 8 9
TU4×4 0 1 1
TU8×8 2 3 3 4 4
TU16×16 5 6 6 7 7 8 8
TU32×32 9 10 10 11 11 12 12 13 13
As another example, the function may be:
ctx _ idx ═ offset + (i > k), (5)
Wherein:
offset 3 × n + ((n +1) > 2), (6)
k ═ n +3 > 2, and (7)
n=(log2(TUBlkSize)-2)。 (8)
Alternatively, for purposes of the present invention, the example function (8) may be represented as: n ═ n (log)2(block_size)-2)。
Table 7 below illustrates an example of context indices that video encoder 20 may use to code bins at various binary indices for various block (e.g., TU) sizes using example functions (5) - (8). Although table 7 is provided for purposes of explaining the results of the functions, it will be appreciated that tables such as table 7 need not be stored in video coding devices such as source device 12 and/or destination device 14. Instead, one or both of video encoder 20 and video decoder 30 may perform the example functions (5) - (8) above to produce the results indicated in table 7.
TABLE 7
Binary index 0 1 2 3 4 5 6 7 8 9
TU4×4 0 1 2
TU8×8 3 3 4 4 5
TU16×16 6 6 7 7 8 8 9
TU32×32 10 10 11 11 12 12 13 13 14
Tables 8 and 9 below illustrate another example in which video encoder 20 and/or video decoder 30 may apply one or more formula-based context derivation techniques of this disclosure for binaries in "last position" coding to luma and chroma components in a unified manner. In particular, table 8 illustrates binary indices for various sizes of luma TUs, while table 9 provides binary indices for various sizes of chroma TUs.
TABLE 8 luminance
Binary index 0 1 2 3 4 5 6 7 8 9
TU4×4 0 1 2
TU8×8 3 3 4 4 5
TU16×16 6 6 7 7 8 8 9
TU32×32 10 10 11 11 12 12 13 13 14
TABLE 9 color number
Binary index 0 1 2 3 4 5 6 7 8 9
TU4×4 0 1 2
TU8×8 0 0 1 1 2
TU16×16 0 0 1 1 2 2 3
One example of a function that video encoder 20 and/or video decoder 30 may use to derive context for a binary in the last position coding of a luma TU (according to table 8) and a chroma TU (according to table 9) is:
ctx _ idx ═ offset + (i > k), (9)
Where luminance and chrominance share the same value k, k ═ n +3 > 2, where n ═ log2(TUBlkSize)-2)
Video encoder 20 and/or video decoder 30 may use various functions to determine the value of the variable number "offset" of function (9) based on whether the TU is a luma TU or a chroma TU. Examples of such functions include the following:
brightness: offset 3 × n + ((n +1) > 2) (10)
Chroma: offset of 0 (11)
In this way, function (9) represents an example of a function that video encoder 20 and/or video decoder 30 may execute to generate a context index. The context index, in turn, may indicate an index that is binary (i) and a value (k) that indicates the block size, calculated based on n, which is log2(TuBlkSize) -2) for coding a binary context that indicates a value of a last significant coefficient of a block of video data. In this example, video encoder 20 and/or video decoder 30 may also perform example function (9) to generate the context index based on an offset value determined based on whether the block is a chroma block or a luma block, e.g., as shown in functions (10) and (11).
As another example, video encoder 20 may implement a step function to derive a context index to be used for entropy coding a context of the ith bin. More specifically, the step function may represent a function having two or more portions depending on, for example, the value of the binary index i. Thus, video encoder 20 and/or video decoder 30 may divide the bins in the last position value into different subsets, e.g., subset 0, subset 1, etc. In addition, video encoder 20 and/or video decoder 30 may apply different functions for different subsets, e.g., F0() for subset 0, F1() for subset 1, and so on. For example, such a function may be the following:
wherein
TUSIZEoffset=(log2(TUBlkSize)-2)*(log2(TUBlkSize)-1)/2。 (12)
In some implementations, the subset may be predefined, and video encoder 20 and video decoder 30 may access the definition of the subset. Alternatively, video encoder 20 (or a user of source device 12) may select the subset, and output interface 22 may transmit the selected subset to video decoder 30 of destination device 14 using one or more high-level syntax signaling techniques, such as SPS, PPS, APS, frame header, slice header, sequence header, or other such syntax signaling. The definition of the subset may also depend on various other types of information, such as a block size (e.g., TU size), a Residual Quadtree (RQT) depth corresponding to the block, whether the block corresponds to a luma component or a chroma component, a frame size (e.g., in pixel resolution) of a frame including the block, a motion compensation block size of a motion compensation block (e.g., a Prediction Unit (PU)) corresponding to the block, a frame type (I/P/B) of a frame including the block, an inter prediction direction of a corresponding motion compensation block, a motion vector magnitude of a corresponding motion compensation block, and/or a motion vector difference magnitude of a motion vector of a corresponding motion compensation block.
Table 10 below illustrates an example of context indices that video encoder 20 may use to code bins at various bin indices at various block (e.g., TU) sizes using an example function (12). Although table 10 is provided for purposes of explaining the results of the functions, it will be appreciated that tables such as table 10 need not be stored in video coding devices such as source device 12 and/or destination device 14. Instead, one or both of video encoder 20 and video decoder 30 may perform the example function (12) described above to produce the results indicated in table 10.
Watch 10
Binary index 0 1 2 3 4 5 6 7 8 9
TU4×4 0 0 10
TU8×8 1 1 2 2 10
TU16×16 3 3 4 4 5 5 10
TU32×32 6 6 7 7 8 8 9 9 10
The example functions (1) - (12) described above may depend, at least in part, on one or more elements of the side information. As one example, the function may accept the side information as arguments. In other examples, video encoder 20 and/or video decoder 30 may select different functions based on the corresponding side information. The side information may include any or all of: a block size (e.g., TU size), a residual quadtree-of-four (RQT) depth corresponding to the block, whether the block corresponds to a luma component or a chroma component, a frame size (e.g., in pixel resolution) of a frame including the block, a motion compensation block size of a motion compensation block (e.g., a Prediction Unit (PU)) corresponding to the block, a frame type (I/P/B) of a frame including the block, an inter prediction direction of the corresponding motion compensation block, a motion vector magnitude of the corresponding motion compensation block, and/or a motion vector difference magnitude of a motion vector of the corresponding motion compensation block. As one example, video encoder 20 and/or video decoder 30 may select different functions (relative to chroma blocks) to derive contexts applied when coding a binary of a value indicating a last significant coefficient position of a luma block.
Video encoder 20 may further send syntax data (e.g., block-based syntax data, frame-based syntax data, and GOP-based syntax data) to video decoder 30 (e.g., in a frame header, a block header, a slice header, or a GOP header). The GOP syntax data may describe a number of frames in a respective GOP, and the frame syntax data may indicate an encoding/prediction mode used to encode the corresponding frame.
Video encoder 20 and video decoder 30 may each be implemented as any of a variety of suitable encoder or decoder circuits, as applicable, such as one or more microprocessors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs), discrete logic circuitry, software, hardware, firmware, or any combinations thereof. Each of video encoder 20 and video decoder 30 may be included in one or more encoders or decoders, either of which may be integrated as part of a combined video encoder/decoder (CODEC). A device that includes video encoder 20 and/or video decoder 30 may comprise an integrated circuit, a microprocessor, and/or a wireless communication device (e.g., a cellular telephone).
In this manner, video encoder 20 and video decoder 30 represent examples of a video coder configured to determine a context for entropy coding a bin of values indicative of a last significant coefficient of a block of video data using a function of an index of the bin, and code the bin using the determined context.
Fig. 2 is a block diagram illustrating an example of a video encoder 20 that may implement techniques for determining a context used to code a value representing a last significant coefficient of a block of video data. Video encoder 20 may perform intra-coding and inter-coding of video blocks within a video slice. Intra-coding relies on spatial prediction to reduce or remove spatial redundancy of video within a given video frame or picture. Inter-coding relies on temporal prediction to reduce or remove temporal redundancy of video within contiguous frames or pictures of a video sequence. Intra-mode (I-mode) may refer to any of a number of spatial-based coding modes. An inter mode, such as uni-directional prediction (P-mode) or bi-directional prediction (B-mode), may refer to any of a number of temporally based coding modes.
As shown in fig. 2, video encoder 20 receives a current video block within a video frame to be encoded. In the example of fig. 2, video encoder 20 includes mode select unit 40, reference frame memory 64, summer 50, transform processing unit 52, quantization unit 54, and entropy encoding unit 56. Mode select unit 40, in turn, includes motion compensation unit 44, motion estimation unit 42, intra-prediction unit 46, and partition unit 48. For video block reconstruction, video encoder 20 also includes an inverse quantization unit 58, an inverse transform unit 60, and a summer 62. A deblocking filter (not shown in fig. 2) may also be included to filter block boundaries to remove blocking artifacts from reconstructed video. The deblocking filter will typically filter the output of summer 62 if desired. In addition to deblocking filters, additional filters (in-loop or post-loop) may also be used. Such filters are not shown for simplicity, but may filter the output of summer 50 (as an in-loop filter) if desired.
During the encoding process, video encoder 20 receives a video frame or slice to be coded. The frame or slice may be divided into a plurality of video blocks. Motion estimation unit 42 and motion compensation unit 44 perform inter-predictive coding of the received video block relative to one or more blocks in one or more reference frames to provide temporal prediction. Intra-prediction unit 46 may alternatively perform intra-predictive coding of the received video block relative to one or more neighboring blocks in the same frame or slice as the block to be coded to provide spatial prediction. Video encoder 20 may perform multiple coding passes, for example, to select an appropriate coding mode for each block of video data.
Furthermore, partition unit 48 may partition a block of video data into sub-blocks based on an evaluation of previous partition schemes in previous coding passes. For example, partition unit 48 may initially partition a frame or slice into LCUs, and partition each of the LCUs into sub-CUs based on bit rate-distortion analysis (e.g., bit rate-distortion optimization). Mode select unit 40 may further generate a quadtree data structure that indicates partitioning of the LCU into sub-CUs. Leaf-node CUs of a quadtree may include one or more PUs and one or more TUs.
Mode select unit 40 may select one of the coding modes (intra or inter), e.g., based on the error results, and provide the resulting intra or inter coded block to summer 50 to generate residual block data and to summer 62 to reconstruct the encoded block for use as a reference frame. Mode select unit 40 also provides syntax elements, such as motion vectors, intra-mode indicators, partition information, and other such syntax information, to entropy encoding unit 56.
Motion estimation unit 42 and motion compensation unit 44 may be highly integrated, but are illustrated separately for conceptual purposes. Motion estimation, performed by motion estimation unit 42, is the process of generating motion vectors that estimate the motion of video blocks. For example, a motion vector may indicate the displacement of a PU of a video block within a current video frame or picture relative to a predictive block within a reference frame (or other coded unit) that is relative to a current block being coded within the current frame (or other coded unit). A predictive block is a block that is found to closely match the block to be coded in terms of pixel differences, which may be determined by Sum of Absolute Differences (SAD), Sum of Squared Differences (SSD), or other difference metrics. In some examples, video encoder 20 may calculate values for sub-integer pixel positions of reference pictures stored in reference frame memory 64. For example, video encoder 20 may interpolate values for one-quarter pixel positions, one-eighth pixel positions, or other fractional pixel positions of the reference picture. Thus, motion estimation unit 42 may perform a motion search relative to the full pixel position and the fractional pixel position and output a motion vector with fractional pixel precision.
Motion estimation unit 42 calculates a motion vector for a PU of a video block in an inter-coded slice by comparing the location of the PU to the location of a predictive block of a reference picture. The reference picture may be selected from a first reference picture list (list 0) or a second reference picture list (list 1), each of list 0 or list 1 identifying one or more reference pictures stored in reference frame memory 64. Motion estimation unit 42 sends the calculated motion vectors to entropy encoding unit 56 and motion compensation unit 44.
The motion compensation performed by motion compensation unit 44 may involve extracting or generating a predictive block based on the motion vectors determined by motion estimation unit 42. Again, in some examples, motion estimation unit 42 and motion compensation unit 44 may be functionally integrated. Upon receiving the motion vector for the PU of the current video block, motion compensation unit 44 may locate, in one of the reference picture lists, the predictive block to which the motion vector points. Summer 50 forms a residual video block by subtracting the pixel values of the predictive block from the pixel values of the current video block being coded, forming pixel difference values, as discussed below. In general, motion estimation unit 42 performs motion estimation with respect to the luma component, and motion compensation unit 44 uses motion vectors calculated based on the luma component for both the chroma and luma components. Mode select unit 40 may also generate syntax elements associated with the video blocks and the video slice for use by video decoder 30 in decoding the video blocks of the video slice.
In lieu of inter-prediction (as described above) performed by motion estimation unit 42 and motion compensation unit 44, intra-prediction unit 46 may intra-predict the current block. In particular, intra-prediction unit 46 may determine the intra-prediction mode to be used to encode the current block. In some examples, intra-prediction unit 46 may encode the current block using various intra-prediction modes, e.g., during separate encoding passes, and intra-prediction unit 46 (or mode select unit 40 in some examples) may select an appropriate intra-prediction mode to use from the tested modes.
For example, intra-prediction unit 46 may calculate bit rate-distortion values using bit rate-distortion analysis for various tested intra-prediction modes, and select the intra-prediction mode with the best bit rate-distortion characteristics among the tested modes. Bitrate-distortion analysis generally determines the amount of distortion (or error) between an encoded block and an original, unencoded block that was encoded to produce the encoded block, as well as the bitrate (i.e., number of bits) used to produce the encoded block. Intra-prediction unit 46 may calculate the ratios of the various encoded blocks from the distortion and bit rate to determine which intra-prediction mode exhibits the best bit rate-distortion value for the block.
After selecting the intra-prediction mode for the block, intra-prediction unit 46 may provide information indicating the selected intra-prediction mode for the block to entropy encoding unit 56. Entropy encoding unit 56 may encode information indicating the selected intra-prediction mode. Video encoder 20 may include, in transmitted bitstream configuration data, which may include a plurality of intra-prediction mode index tables and a plurality of modified intra-prediction mode index tables (also referred to as codeword mapping tables), definitions of the encoding contexts for the various blocks, and indications of the most probable intra-prediction modes, intra-prediction mode index tables, and modified intra-prediction mode index tables to be used for each of the contexts.
Video encoder 20 forms a residual video block by subtracting the prediction data from mode select unit 40 from the original video block being coded. Summer 50 represents one or more components that perform this subtraction operation. Transform processing unit 52 applies a transform, such as a Discrete Cosine Transform (DCT) or a conceptually similar transform, to the residual block, producing a video block that includes residual transform coefficient values. Transform processing unit 52 may perform other transforms that are conceptually similar to DCT. Wavelet transforms, integer transforms, subband transforms, or other types of transforms may also be used. In any case, transform processing unit 52 applies a transform to the residual block, producing a block of residual transform coefficients. The transform may convert the residual information from a pixel value domain to a transform domain (e.g., frequency domain). Transform processing unit 52 may send the resulting transform coefficients to quantization unit 54. Quantization unit 54 quantizes the transform coefficients to further reduce the bit rate. The quantization process may reduce the bit depth associated with some or all of the coefficients. The quantization level may be modified by adjusting the quantization parameter. In some examples, quantization unit 54 may then perform a scan of a matrix including quantized transform coefficients. Alternatively, entropy encoding unit 56 may perform the scan.
After quantization, entropy encoding unit 56 entropy codes the quantized transform coefficients. For example, entropy encoding unit 56 may perform Context Adaptive Variable Length Coding (CAVLC), Context Adaptive Binary Arithmetic Coding (CABAC), syntax-based context adaptive binary arithmetic coding (SBAC), Probability Interval Partition Entropy (PIPE) coding, or another entropy coding technique. In the case of context-based entropy coding, the contexts may be based on neighboring blocks. Following entropy coding by entropy encoding unit 56, the encoded bitstream may be transmitted to another device (e.g., video decoder 30) or archived for later transmission or retrieval.
In particular, entropy encoding unit 56 may receive a set of quantized transform coefficients associated with a TU from quantization unit 54. Entropy encoding unit 56 may then scan the quantized set of transform coefficients and determine whether each scanned coefficient includes a significant coefficient, i.e., whether the value of the coefficient is zero or non-zero. A non-zero value may indicate that a particular quantized transform coefficient is a "significant" coefficient. In examples where entropy encoding unit 56 detects significant coefficients, entropy encoding unit 56 may code data representing particular values (e.g., 1, 2, etc.) associated with the coefficients. Such data may include, for example, an indication of the sign of the coefficient, whether the absolute value of the coefficient is greater than one, and whether the absolute value of the coefficient is greater than two when the absolute value of the coefficient is greater than one. Additionally, in examples where the absolute value of a significant coefficient is greater than two, entropy encoding unit 56 may subtract two from the absolute value of the coefficient, thereby obtaining one value (which is more than two by the value), and code this value.
By scanning the entire set of quantized transform coefficients received from quantization unit 54, entropy encoding unit 56 may also detect and identify the last significant coefficient associated with a particular TU (i.e., in scan order). In addition, entropy encoding unit 56 may determine that the last significant coefficient corresponds to a position within the corresponding TU. For example, entropy encoding unit 56 may identify the horizontal and vertical (x-or y-) coordinates of the last significant coefficient within the TU.
Moreover, entropy encoding unit 56 may be configured to binarize syntax elements that do not already have a binary value. That is, entropy encoding unit 56 may determine a binary string that represents a value of the syntax element when the syntax element is not already represented by the binary string. The binary string or binarized value generally corresponds to an array of bits, each of which may have a value of either "0" or "1". The array may be indexed by zero such that the array's ordinal first bit appears at position 0, the array's ordinal second bit appears at position 1, and so on. Thus, entropy encoding unit 56 may form a binarized value B [ N ] of length N bits, where each bit appears at a corresponding position B [ i ], where 0 ≦ i ≦ N-1.
Entropy encoding unit 56 may then entropy encode the data representing the x and y coordinates of the last significant coefficient. For example, entropy encoding unit 56 may be configured to entropy encode syntax elements last _ significant _ coeff _ x _ prefix, last _ significant _ coeff _ y _ prefix, last _ significant _ coeff _ x _ suffix, and/or last _ significant _ coeff _ y _ suffix, which together represent the x and y coordinates of the last significant coefficient in scan order in HEVC. Entropy encoding unit 56 may implement one or more techniques of this disclosure to entropy encode data representing the coordinates of the last significant coefficient using a function represented by f (i). For example, entropy encoding unit 56 may entropy encode various syntax elements, such as quantized transform coefficients received from quantization unit 54 and/or syntax elements (e.g., the syntax elements described above) representing values of the last significant coefficients of the TUs, using contexts determined using one or more functions of a binary representing the values of the corresponding syntax elements.
For example, as described above with reference to tables 1-2 and tables 8-9, "Ctx _ i" may represent an index of a context of the ith bin in the binarized value used by entropy encoding unit 56 to encode a position representing the last significant coefficient. The context indexed by ctx _ i generally indicates the most likely symbol (e.g., "1" or "0") and the likelihood of the most likely symbol. Entropy encoding unit 56 may derive the value of Ctx _ i using the equation Ctx _ i ═ f (i), where f (i) may be a predefined function available to entropy encoding unit 56, or a function selected by the user. Additionally, entropy encoding unit 56 may encode data representing f (i) such that video decoder 30 may decode the data for function f (i) and obtain the value of Ctx _ i using f (i). In this way, entropy encoding unit 56 may use a function of the bin index, i.e., the position of the bin in the binarized value (i.e., bin string) representing the syntax element, to determine the context for a particular bin of the binarized syntax element.
In some examples, entropy encoding unit 56 is configured to determine a context for coding a bin of data representing a last significant coefficient position using equations (5) through (8) described above. That is, the entropy encoding unit 56 may calculate f (i) as follows: ctx _ idx ═ offset + (i > k). Furthermore, entropy encoding unit 56 may derive the values for offset value and k in f (i) using the following equations:
offset 3 × n + ((n +1) > 2),
k ═ n +3 > 2, and
n=(log2(block_size)-2)。
in other implementations, entropy encoding unit 56 may use one or more of example functions (1) - (4) and (9) - (12) in addition to or instead of equations (5) - (8) when determining a context for entropy encoding a binary of data representing a position of a last significant coefficient of a TU. In this way, video encoder 20 and its components (e.g., entropy encoding unit 56) may implement the techniques of this disclosure to encode data representing the last significant coefficient using one or more functions. Such functions may be more efficiently stored in the memory of video encoder 20 and video decoder 30 than in a table. Thus, the techniques of this disclosure may provide video encoders and video decoders that more efficiently utilize memory, e.g., by allocating memory to other data that would otherwise be dedicated to a table, or by reducing the amount of memory required by a video encoder or video decoder.
Inverse quantization unit 58 and inverse transform unit 60 apply inverse quantization and inverse transform, respectively, to reconstruct the residual block in the pixel domain, e.g., for later use as a reference block. Motion compensation unit 44 may calculate a reference block by adding the residual block to a predictive block of one of the frames of reference frame memory 64. Motion compensation unit 44 may also apply one or more interpolation filters to the reconstructed residual block to calculate sub-integer pixel values for use in motion estimation. Summer 62 adds the reconstructed residual block to the motion compensated prediction block generated by motion compensation unit 44 to generate a reconstructed video block for storage in reference frame memory 64. The reconstructed video block may be used by motion estimation unit 42 and motion compensation unit 44 as a reference block to inter-code a block in a subsequent video frame.
In this manner, video encoder 20 of fig. 2 represents an example of a video encoder configured to determine a context for entropy coding a bin of values indicative of a last significant coefficient of a block of video data using a function of an index of the bin and code the bin using the determined context. Furthermore, video encoder 20 also represents an example of a video encoder in which a function generates a context index for a context by right-shifting a binary index by a value k and adding the right-shifted value to an offset value, wherein the offset value is determined according to the formula offset 3 n + ((n +1) > 2), wherein the value k is determined according to the formula k (n +3) > 2, and wherein the value n is determined according to the formula n (log +3) > 22(block _ size) -2).
Fig. 3 is a block diagram illustrating an example of a video decoder 30 that may implement techniques for determining a context used to code a value representing a last significant coefficient of a block of video data. In the example of fig. 3, video decoder 30 includes an entropy decoding unit 70, a motion compensation unit 72, an intra prediction unit 74, an inverse quantization unit 76, an inverse transform unit 78, a reference frame memory 82, and a summer 80. In some examples, video decoder 30 may perform a decoding pass that is substantially reciprocal to the encoding pass described with respect to video encoder 20 (fig. 2). Motion compensation unit 72 may generate prediction data based on the motion vectors received from entropy decoding unit 70, while intra-prediction unit 74 may generate prediction data based on the intra-prediction mode indicator received from entropy decoding unit 70.
During the decoding process, video decoder 30 receives an encoded video bitstream representing video blocks of an encoded video slice and associated syntax elements from video encoder 20. Entropy decoding unit 70 of video decoder 30 entropy decodes the bitstream to generate quantized coefficients, motion vectors, or intra-prediction mode indicators, and other syntax elements. Entropy decoding unit 70 forwards the motion vectors and other syntax elements to motion compensation unit 72. Video decoder 30 may receive syntax elements at the video slice level and/or the video block level.
Entropy decoding unit 70 may generate a block (e.g., a TU) of quantized coefficients by entropy decoding the encoded video bitstream and filling the entropy decoded quantized coefficients in a block in scan order. For example, entropy decoding unit 70 may entropy decode syntax elements of the encoded video bitstream to determine the location of significant coefficients in the block to be generated. If the position of the block corresponds to a coefficient that is not a significant coefficient, entropy decoding unit 70 may set the value of the coefficient at that position in the block to zero. On the other hand, if entropy decoding unit 70 determines that a particular quantized coefficient is a significant coefficient, entropy decoding unit 70 may set the value of the significant coefficient based on data provided by video encoder 20 in the encoded video bitstream.
Furthermore, as explained below, entropy decoding unit 70 may determine the position of the last significant coefficient in the block based on syntax elements indicating the x and y coordinates of the last significant coefficient. In accordance with the techniques of this disclosure, as explained in more detail below, entropy decoding unit 70 may use a function to determine a binary context for entropy decoding a value representing the x and y coordinates of the last significant coefficient. Video decoder 30 may use the indication of the position of the last significant coefficient to determine when data of the bitstream represents a subsequent syntax element (i.e., a syntax element that does not represent data of the block being played back).
Entropy decoding unit 70 may determine a sign of each significant coefficient, as well as data representing a level value for each significant coefficient, based on data provided in the encoded video bitstream. For example, entropy decoding unit 70 may determine the signs of the significant coefficients by entropy decoding syntax elements (e.g., coeff sign flag) that represent the signs. In addition, entropy decoding unit 70 may decode one or more syntax elements that represent the level values of each significant coefficient, such as coeff _ abs _ level _ header 1_ flag, coeff _ abs _ level _ header 2_ flag, and coeff _ abs _ level _ remaining. In general, coeff _ abs _ level _ header 1_ flag indicates whether the absolute value of an effective coefficient is greater than 1, coeff _ abs _ level _ header 2_ flag indicates whether the absolute value of an effective coefficient is greater than 2, and coeff _ abs _ level _ remaining indicates that the absolute value of an effective coefficient is decreased by 2.
Entropy decoding unit 70 may also determine the position of the last significant coefficient of the block (e.g., TU) being regenerated. More specifically, entropy decoding unit 70 may identify the position of the last significant coefficient within a TU associated with the encoded video bitstream (e.g., based on coded syntax elements representing x and y coordinates). Based on identifying the position of the last significant coefficient, entropy decoding unit 70 may set the values of the remaining coefficients in the TU to zero in the scanning order. That is, video decoder 30 need not receive any syntax elements for coefficients other than the last significant coefficient, and in addition, may infer that the values of these coefficients are 0.
Additionally, entropy decoding unit 70 may implement one or more techniques of this disclosure to decode a bin of a binarized value representing x and y coordinates of a position of a last significant coefficient using a function generally represented by f (i), where i corresponds to a position in the bin in the binarized value. In some examples, entropy decoding unit 70 may decode the encoded data using the determined context to reproduce a binary value (e.g., "0" or "1"). Although described as corresponding to the last significant coefficient position, the techniques of this disclosure are equally applicable to entropy decoding other syntax elements. For example, entropy decoding unit 70 may entropy decode various syntax elements, e.g., syntax elements of quantized coefficients sent to one or both of motion compensation unit 72 and intra-prediction unit 74, syntax elements representing quantized transform coefficients, and/or values representing last significant coefficients of TUs associated with the encoded video bitstream, using contexts determined using one or more functions of binary indices representing values of corresponding syntax elements.
For example, as described above with reference to tables 1-2 and tables 8-9, "Ctx _ i" may represent an index of a context of the ith bin in the binarized value used by entropy decoding unit 70 to decode the position representing the last significant coefficient. In this example, entropy decoding unit 70 may derive the value of Ctx _ i using the equation Ctx _ i ═ f (i), where f (i) may be a predefined function available to entropy decoding unit 70 (e.g., communicated by source device 12), or a function selected by the user. In addition, entropy decoding unit 70 may decode the data representing f (i) to obtain a value of Ctx _ i using the data representing f (i).
In some examples, entropy decoding unit 70 is configured to determine a context for decoding a bin of data representing a last significant coefficient position using equations (5) through (8) described above. That is, the entropy decoding unit 70 may calculate f (i) as follows: ctx _ idx ═ offset + (i > k). Furthermore, entropy decoding unit 70 may derive the values for offset value and k in f (i) using the following equations:
offset 3 × n + ((n +1) > 2),
k ═ n +3 > 2, and
n=(log2(block_size)-2)。
in other implementations, entropy decoding unit 70 may set f (i) to one or more of example equations (1) through (4) and (9) through (12) when decoding the last significant coefficient of a TU represented by the encoded video bitstream. In this way, video decoder 30 and its components (e.g., entropy decoding unit 70) may implement the techniques of this disclosure to decode the last significant coefficient using one or more functions. Such functions may be more efficiently stored in the memory of video encoder 20 and video decoder 30 than in a table. Thus, the techniques of this disclosure may provide video encoders and video decoders that more efficiently utilize memory, e.g., by allocating memory to other data that would otherwise be dedicated to a table, or by reducing the amount of memory required by a video encoder or video decoder.
When a video slice is coded as an intra-coded (I) slice, intra-prediction unit 74 may generate prediction data for a video block of the current video slice based on the signaled intra-prediction mode and data from previously decoded blocks of the current frame or picture. When the video frame is coded as an inter-coded (i.e., B, P or GPB) slice, motion compensation unit 72 generates predictive blocks for the video blocks of the current video slice based on the motion vectors and other syntax elements received from entropy decoding unit 70. The predictive block may be generated from one of the reference pictures within one of the reference picture lists. Video decoder 30 may use a default construction technique to construct the reference frame lists, list 0 and list 1, based on the reference pictures stored in reference frame memory 82.
Motion compensation unit 72 determines prediction information for video blocks of the current video slice by parsing the motion vectors and other syntax elements and uses the prediction information to generate predictive blocks for the current video block being decoded. For example, motion compensation unit 72 uses some of the received syntax elements to determine the construction information for one or more of the reference picture lists used to code the video blocks of the video slice (e.g., intra-prediction or inter-prediction), the inter-prediction slice type (e.g., B-slice, P-slice, or GPB-slice), the slice, the motion vector for each inter-coded video block of the slice, the inter-prediction state for each inter-coded video block of the slice, and other information used to decode the video blocks in the current video slice.
Motion compensation unit 72 may also perform interpolation based on the interpolation filter. Motion compensation unit 72 may use interpolation filters as used by video encoder 20 during encoding of video blocks to calculate interpolated values for sub-integer pixels of a reference block. In this case, motion compensation unit 72 may determine the interpolation filter used by video encoder 20 from the received syntax elements and use the interpolation filter to generate the predictive block.
Inverse quantization unit 76 inverse quantizes (i.e., de-quantizes) the quantized transform coefficients provided in the bitstream and decoded by entropy decoding unit 70. The inverse quantization process may include using, for each video block in the video slice, the quantization parameter QP calculated by video decoder 30YTo determine the degree of quantization and likewise the degree of inverse quantization that should be applied.
The inverse transform unit 78 applies an inverse transform (e.g., an inverse DCT, an inverse integer transform, or a conceptually similar inverse transform process) to the transform coefficients in order to generate a residual block in the pixel domain.
After motion compensation unit 72 generates the predictive block for the current video block based on the motion vector and other syntax elements, video decoder 30 forms a decoded video block by summing the residual block from inverse transform unit 78 with the corresponding predictive block generated by motion compensation unit 72. Summer 80 represents one or more components that perform this addition operation. If desired, a deblocking filter may also be applied to filter the decoded blocks in order to remove blocking artifacts. Other in-loop filters (in or after the coding loop) may also be used to smooth pixel transitions, or otherwise improve video quality. The decoded video blocks in a given frame or picture are then stored in reference frame memory 82, which stores reference pictures used for subsequent motion compensation. Reference frame memory 82 also stores decoded video for later presentation on a display device (e.g., display device 32 of fig. 1).
In this manner, video decoder 30 of fig. 3 represents an example of a video decoder configured to determine a context for entropy coding a bin of values indicative of a last significant coefficient of a block of video data using a function of an index of the bin and code the bin using the determined context. Furthermore, video decoder 30 also represents an example of a video decoder, wherein the function generates a context index for the context by right-shifting a binary index by a value k and adding the right-shifted value to an offset value, wherein the offset value is determined according to the formula offset 3 n + ((n +1) > 2), wherein the value k is determined according to the formula k (n +3) > 2, and wherein the value n is determined according to the formula n (log +3) > 22(block _ size) -2).
FIG. 4 is a flow diagram illustrating an example method for encoding a current block. The current block may include the current CU or a portion of the current CU. Although described with reference to video encoder 20 (fig. 1 and 2), it should be understood that other devices may be configured to perform a method similar to that of fig. 4. Moreover, although the example method of fig. 4 specifically describes using these techniques to code syntax elements related to the position of the last significant coefficient of a video block, it should be understood that these techniques are equally applicable to coding other syntax elements.
In this example, video encoder 20 initially predicts the current block (150). For example, video encoder 20 may calculate one or more Prediction Units (PUs) for the current block. Video encoder 20 may then calculate a residual block for the current block, e.g., to generate a Transform Unit (TU) (152). To calculate the residual block, video encoder 20 may calculate a difference between the original uncoded block and the predicted block for the current block. Video encoder 20 may then transform and quantize the coefficients of the residual block (154). Next, video encoder 20 may scan the quantized transform coefficients of the residual block (156). During scanning, or after scanning, video encoder 20 may entropy encode the coefficients (158). For example, video encoder 20 may encode the coefficients using CAVLC or CABAC.
Video encoder 20 may also determine a value for the position of the last significant coefficient in the TU (160). The value may comprise, for example, a binarized value representing the position of the last significant coefficient, e.g., as described above with reference to table 1. The maximum number of bins of the value may be coded using CABAC, while other bins exceeding the maximum number may be bypass coded, again as described with reference to table 1. In particular, according to the techniques of this disclosure, video encoder 20 may use a function to determine a binary context for the value (162). As explained above, the context may describe the likelihood that the binary has a particular value (e.g., "0" or "1"). The function may correspond to one of the functions (1) through (12) described above, or a conceptually similar function.
With respect to examples of functions (5) through (8), video encoder 20 may use the formula offset + (i > k) (where offset 3 n + ((n +1) > 2), k (n +3) > 2, and n (log)2(block size) -2)), to determine the context ctx idx for the bin located at position i in the binarized value, where the binarized value represents the position of the last significant coefficient. That is, video encoder 20 may perform an iteration for each bin to be entropy encoded and perform the functions shown above to determine a context for coding the bin of the current iteration. Video encoder 20 may then encode a binary of the value (e.g., a binary that does not exceed the maximum number of binaries) using the determined context (164). Likewise, video encoder 20 may bypass coding any remaining binaries of the value (166).
In this manner, the method of fig. 4 represents an example of a method that includes determining a context for entropy coding a bin of values indicative of a last significant coefficient of a block of video data using a function of an index of the bin, and coding the bin using the determined context. Further, the function may generate a context index for the context by right-shifting the binary index by a value k and adding the right-shifted value to an offset value, wherein the offset value is determined according to a formula offset 3 n + ((n +1) > 2), wherein the value k is determined according to a formula k (n +3) > 2, and wherein the value n is determined according to a formula n (log)2(block _ size) -2).
Fig. 5 is a flow diagram illustrating an example method for decoding a current block of video data. The current block may include the current CU or a portion of the current CU. Although described with reference to video decoder 30 (fig. 1 and 3), it should be understood that other devices may be configured to perform a method similar to that of fig. 5. Moreover, although the example method of fig. 4 specifically describes using these techniques to code syntax elements related to the position of the last significant coefficient of a video block, it should be understood that these techniques are equally applicable to coding other syntax elements.
Video decoder 30 may predict the current block (200), e.g., using an intra or inter prediction mode to calculate a predicted block for the current block. Video decoder 30 may also receive entropy coded data for the current block, e.g., entropy coded data corresponding to coefficients of a residual block for the current block (202). Video decoder 30 may entropy decode the entropy coded data to reproduce the coefficients of the residual block (204).
In accordance with the techniques of this disclosure, video decoder 30 may receive an encoded value indicating the position of the last significant coefficient in a TU (206). The maximum number of bins of the value may be decoded using CABAC, while other bins exceeding the maximum number may be bypass decoded, as described with reference to table 1. In particular, according to the techniques of this disclosure, video decoder 30 may use a function to determine a context for the binary of the value (208). As explained above, the context may describe the likelihood that the binary has a particular value (e.g., "0" or "1"). The function may correspond to one of the functions (1) - (12) described above, or a conceptually similar function.
With respect to examples of functions (5) through (8), video decoder 30 may use the formula offset + (i > k) (where offset 3 n + ((n +1) > 2), k (n +3) > 2, and n (log)2(block size) -2)) to determine a binary context ctx idx located at position i in the binarized value being decoded, wherein the binarized value represents the position of the last significant coefficient. That is, video decoder 30 may iteratively decode each bin to be entropy decoded and perform the functions shown above to determine a context for coding the bin of the current iteration. Video decoder 30 may then decode a bin of the value (e.g., a bin that does not exceed the maximum number of bins) using the determined context (210). For example, video decoder 30 may decode encoded data received from video encoder 20 using the determined context to reproduce or otherwise obtain a binary of the value. Likewise, video decoder 30 may bypass decoding any remaining binaries of the value (212).
Video decoder 30 may then inverse scan the regenerated coefficients based on the position of the last significant coefficient (214) to create a block of quantized transform coefficients. That is, video decoder 30 may start at the position of the last significant coefficient and place the decoded coefficients in the TU in a scan order that substantially corresponds to the scan order used by the encoder. Video decoder 30 may then inverse quantize and inverse transform the coefficients to generate a residual block (216). Video decoder 30 may finally decode the current block by combining the predicted block and the residual block (218).
In this manner, the method of fig. 5 represents an example of a method that includes determining a context for entropy coding a bin of values indicative of a last significant coefficient of a block of video data using a function of an index of the bin, and coding the bin using the determined context. Further, the function may generate a context index for the context by right-shifting the binary index by a value k and adding the right-shifted value to an offset value, wherein the offset value is determined according to a formula offset 3 n + ((n +1) > 2), wherein the value k is determined according to a formula k (n +3) > 2, and wherein the value n is determined according to a formula n (log)2(block _ size) -2).
It should be recognized that depending on the example, certain acts or events of any of the techniques described herein may be performed in a different order, may be added, merged, or omitted entirely (e.g., not all described acts or events are necessary to practice the techniques). Further, in some instances, acts or events may be performed concurrently, e.g., through multi-threaded processing, interrupt processing, or multiple processors, rather than sequentially.
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 over as one or more instructions or code on a computer-readable medium and executed by a hardware-based processing unit. Computer-readable media may include computer-readable storage media (which corresponds to tangible media such as data storage media) or communication media, including any medium that facilitates transfer of a computer program from one place to another, such as according to a communication protocol. In this manner, the computer-readable medium may generally correspond to (1) a tangible computer-readable storage medium that is not 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. The computer program product may include a computer-readable medium.
By way of example, and not limitation, such computer-readable storage media can 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 can be used to store desired code in the form of instructions or data structures and that can be accessed by a computer. Also, any connection is properly termed a computer-readable medium. For example, if the instructions are transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, Digital Subscriber Line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. It should be understood, however, that computer-readable storage media and data storage media do not include connections, carrier waves, signals, or other transitory media, but rather pertain to non-transitory tangible storage media. Disk and disc, as used herein, includes Compact Disc (CD), laser disc, optical disc, Digital Versatile Disc (DVD), floppy disk and blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
The instructions may be executed by one or more processors, such as one or more Digital Signal Processors (DSPs), general purpose microprocessors, Application Specific Integrated Circuits (ASICs), field programmable logic arrays (FPGAs), or other equivalent integrated or discrete logic circuitry. Accordingly, the term "processor" as used herein may refer to any of the foregoing structure or any other structure suitable for implementation of the techniques described herein. In addition, in some aspects, the functionality described herein may be provided within dedicated hardware and/or software modules configured for encoding and decoding, or incorporated in a combined codec. Also, the techniques may be fully implemented in one or more circuits or logic elements.
The techniques of this disclosure may be implemented in various means or devices, including a wireless handset, an Integrated Circuit (IC), or a collection of ICs (e.g., a chipset). Various components, modules, or units are described in this disclosure to emphasize functional aspects of devices configured to perform the disclosed techniques, but do not necessarily require realization by different hardware units. Instead, the various units may be combined in a codec hardware unit, as described above, or provided by a set of interoperability hardware units (including one or more processors as described above), in conjunction with suitable software and/or firmware.
Various examples have been described. These and other examples are within the scope of the following claims.

Claims (21)

1. A method of coding video data, the method comprising:
determining a context for entropy coding a bin of a value indicative of a last significant coefficient of a block of video data using a function of an index of the bin;
wherein the function generates a context index for the context by right-shifting the index of the bin by a value k and adding the right-shifted value to an offset value,
wherein the offset value is determined according to the following equation:
offset 3 × n + ((n +1) > 2),
wherein the value k is determined according to the following formula:
k=(n+3)>>2,
wherein the value n is determined according to the following formula:
n=(log2(block _ size) -2), and
wherein the value block _ size comprises a value indicating a size of the block; and
coding the binary using the determined context.
2. The method of claim 1, wherein determining the context comprises executing the function.
3. The method of claim 1, wherein the function comprises a linear function.
4. The method of claim 1, wherein the function comprises a non-linear function.
5. The method of claim 1, wherein the function generates a context index for the context by right-shifting the index of the bin by one.
6. The method of claim 1, further comprising receiving the function from a user.
7. The method of claim 1, further comprising receiving syntax data defining the function.
8. The method of claim 1, wherein coding the binary comprises entropy decoding encoded data using the determined context to reproduce a value of the binary.
9. The method of claim 1, wherein coding the bin comprises entropy encoding the bin using the determined context.
10. A device for coding video data, the device comprising a video coder configured to:
determining a context for entropy coding a bin of a value indicative of a last significant coefficient of a block of video data using a function of an index of the bin,
wherein the function generates a context index for the context by right-shifting the index of the bin by a value k and adding the right-shifted value to an offset value,
wherein the offset value is determined according to the following equation:
offset 3 × n + ((n +1) > 2),
wherein the value k is determined according to the following formula:
k=(n+3)>>2,
wherein the value n is determined according to the following formula:
n=(log2(block_size)-2),
wherein the value block _ size comprises a value indicating a size of the block; and
coding the binary using the determined context.
11. The device of claim 10, wherein the video coder is configured to determine the context at least in part by executing the function.
12. The device of claim 10, wherein the video coder is further configured to receive syntax data defining the function.
13. The device of claim 10, wherein the video coder is configured to code the bin at least in part by entropy decoding encoded data using the determined context to reproduce a value of the bin.
14. The device of claim 10, wherein the video coder is configured to code the bin at least in part by entropy encoding the bin using the determined context.
15. The device of claim 10, wherein the device comprises at least one of:
an integrated circuit;
a microprocessor; and
a wireless communication device comprising the video coder.
16. A device for coding video data, the device comprising:
means for determining a context for entropy coding a bin of values indicative of a last significant coefficient of a block of video data using a function of an index of the bin;
wherein the function generates a context index for the context by right-shifting the index of the bin by a value k and adding the right-shifted value to an offset value,
wherein the offset value is determined according to the following equation:
offset 3 × n + ((n +1) > 2),
wherein the value k is determined according to the following formula:
k=(n+3)>>2,
wherein the value n is determined according to the following formula:
n=(log2(block _ size) -2), and
wherein the value block _ size comprises a value indicating a size of the block; and
means for coding the bin using the determined context.
17. The device of claim 16, wherein the means for determining the context comprises means for performing the function.
18. The device of claim 16, further comprising means for receiving syntax data defining the function.
19. A computer-readable storage medium encoded with instructions that, when executed, cause a programmable processor of a computing device to:
determining a context for entropy coding a bin of a value indicative of a last significant coefficient of a block of video data using a function of an index of the bin;
wherein the function is obtained by right-shifting the index of the bin by a value k and right-shifting the right-shifted
A value is added to an offset value to generate a context index for the context,
wherein the offset value is determined according to the following equation:
offset 3 × n + ((n +1) > 2),
wherein the value k is determined according to the following formula:
k=(n+3)>>2,
wherein the value n is determined according to the following formula:
n=(log2(block _ size) -2), and
wherein the value block _ size comprises a value indicating a size of the block; and
coding the binary using the determined context.
20. The computer-readable storage medium of claim 19, wherein the instructions that cause the programmable processor to determine the context further comprise instructions that cause the programmable processor to perform the function.
21. The computer-readable storage medium of claim 19, further encoded with instructions that, when executed, cause the programmable processor to receive syntax data defining the function.
HK15103086.2A 2012-03-22 2013-03-13 Deriving context for last position coding for video coding HK1202741B (en)

Applications Claiming Priority (9)

Application Number Priority Date Filing Date Title
US201261614178P 2012-03-22 2012-03-22
US61/614,178 2012-03-22
US201261620273P 2012-04-04 2012-04-04
US61/620,273 2012-04-04
US201261666316P 2012-06-29 2012-06-29
US61/666,316 2012-06-29
US13/796,572 US9237344B2 (en) 2012-03-22 2013-03-12 Deriving context for last position coding for video coding
US13/796,572 2013-03-12
PCT/US2013/030886 WO2013142195A1 (en) 2012-03-22 2013-03-13 Deriving context for last position coding for video coding

Publications (2)

Publication Number Publication Date
HK1202741A1 HK1202741A1 (en) 2015-10-02
HK1202741B true HK1202741B (en) 2018-06-08

Family

ID=

Similar Documents

Publication Publication Date Title
US11496385B2 (en) Binarizing secondary transform index
CN113612997B (en) Improved video intra prediction using position-dependent prediction combinations for video coding
US9848197B2 (en) Transforms in video coding
US9237344B2 (en) Deriving context for last position coding for video coding
CN105659603B (en) The method, apparatus and computer-readable storage medium of encoding and decoding video data
US20150071357A1 (en) Partial intra block copying for video coding
US20130070855A1 (en) Hybrid motion vector coding modes for video coding
US20130195199A1 (en) Residual quad tree (rqt) coding for video coding
US20130272423A1 (en) Transform coefficient coding
US20130188698A1 (en) Coefficient level coding
CN103959785A (en) Transform unit partitioning for chroma components in video coding
US20130128971A1 (en) Transforms in video coding
WO2014168812A1 (en) Sample adaptive offset scaling based on bit-depth
KR20140139571A (en) Inter layer texture prediction for video coding
US9762921B2 (en) Deblocking filter with reduced line buffer
HK1202741B (en) Deriving context for last position coding for video coding
HK1196734B (en) Method and device for encoding and decoding video data
HK1196734A (en) Method and device for encoding and decoding video data