HK1185742A - Separately coding the position of a last significant coefficient of a video block in video coding - Google Patents
Separately coding the position of a last significant coefficient of a video block in video coding Download PDFInfo
- Publication number
- HK1185742A HK1185742A HK13113035.5A HK13113035A HK1185742A HK 1185742 A HK1185742 A HK 1185742A HK 13113035 A HK13113035 A HK 13113035A HK 1185742 A HK1185742 A HK 1185742A
- Authority
- HK
- Hong Kong
- Prior art keywords
- block
- coefficient
- scanning order
- coefficients
- coordinate
- Prior art date
Links
Description
This application claims united states provisional application No. 61/419,740, filed on 12/3/2010, which is incorporated herein by reference in its entirety.
Technical Field
This disclosure relates to video coding, and more particularly, to coding of syntax information related to coefficients of a video block.
Background
Digital video capabilities can be incorporated into a wide variety 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 gaming consoles, cellular or satellite radio telephones, so-called "smart phones," video teleconferencing devices, video streaming devices, and the like. Digital video devices implement video compression techniques such as 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 the video compression techniques described in the extensions of the standards. Video devices may more efficiently transmit, receive, encode, decode, and/or store digital video information by implementing these video compression techniques.
Video compression techniques perform 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 (i.e., 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 are encoded using spatial prediction with respect to reference samples in neighboring blocks in the same picture. Video blocks in an inter-coded (P or B) slice of a picture may use spatial prediction with respect to reference samples in neighboring blocks in the same picture or use 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 or temporal prediction generates a prediction block for a block to be coded. The residual data represents pixel differences between the original block to be coded and the prediction block. The inter-coded block is encoded according to a motion vector that points to a block of reference samples that forms the prediction block, and residual data that indicates a difference between the coded block and the prediction block. The intra-coded block is encoded according to an intra-coding mode and residual data. For further compression, the residual data may be transformed from the pixel domain to a transform domain, producing 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
This disclosure describes techniques for coding coefficients associated with a block of video data during a video coding process. The techniques include coding information identifying the position of the last non-zero (or "significant") coefficient within a block according to a scanning order associated with the block (i.e., the last significant coefficient position information for the block) prior to coding information identifying the positions of other significant coefficients within the block (i.e., the significant coefficient position information for the block). The techniques further include coding last significant coefficient position information for the block by performing at least one of: coding a one-dimensional position within a block that identifies a position of a last significant coefficient within the block according to a scan order; coding a two-dimensional position within a block that identifies a position of a last significant coefficient within the block according to a scan order; and coding a flag indicating whether a last significant coefficient within a block according to the scanning order is located within a range of positions within the block, and coding a one-dimensional position within the block when a last significant coefficient within the block according to the scanning order is located within the range, and otherwise coding a two-dimensional position within the block.
When coding the last significant coefficient position information of a block and the significant coefficient position information of the block, the techniques of this disclosure may allow for a coding system of lower complexity relative to other systems and may allow for more efficient coding methods relative to other methods. Coding the last significant coefficient position information before coding the significant coefficient position information has the effect of separating these coding steps, which may enable the information to be coded in parallel, and may enable the use of a coding system having lower complexity than other systems, e.g., a system that codes the information in an interleaved manner.
In addition, the availability of last significant coefficient position information prior to coding significant coefficient position information may enable the use of the last significant coefficient position information to code the information itself and other information of the block. In some examples, the last significant coefficient position information may be used as context for coding the information itself as well as for coding the significant coefficient position information, e.g., when performing a context adaptive entropy coding process (e.g., a Context Adaptive Binary Arithmetic Coding (CABAC) process) that includes applying a context model based on the context. Using the last significant coefficient position information in this manner may result in coding the information itself with accurate statistics, as well as coding the significant coefficient position information, which may enable more efficient coding of the information than when using other methods, e.g., using a smaller number of bits.
In other examples, the last significant coefficient position information may be used as syntax information for the coding information itself as well as for coding the significant coefficient position information, which may again enable the use of coding systems with lower complexity than other systems, and more efficient coding methods than other methods.
As one example, last significant coefficient position information may be used to determine how to code the information itself, e.g., using different techniques to code the information depending on the position of the last significant coefficient within the block according to the scan order, which may enable more efficient coding of the information than when other methods are used.
As another example, the last significant-coefficient position information may be used to determine a context for coding the significant-coefficient position information, e.g., when performing a context adaptive entropy coding process (e.g., a CABAC process) that includes applying a context model based on the context. For example, the significance of the coefficients within a block that precede the last significant coefficient according to scan order may be coded in the reverse scan order, i.e., starting with the last significant coefficient and proceeding to the first coefficient in scan order. In this example, the significance of each coefficient may be coded using the significance of previously coded coefficients as context, which may result in coding significant coefficient position information with accurate statistics and enable more efficient coding of information than when other methods are used.
As yet another example, the last significant coefficient position information may be used to jointly code the significant coefficient position information. For example, significant coefficient position information may be coded by arranging a plurality of coefficients that precede the last significant coefficient within a block according to scanning order into one or more groups, and jointly coding the significance of the coefficients within each group. Using the last significant coefficient position information in this manner may enable coding of the significant coefficient position information itself in parallel, which may again enable the use of coding systems having lower complexity than other systems, as well as more efficient coding of information than when using other methods.
The techniques of this disclosure may be used with any context adaptive entropy coding method, including CABAC, probability interval partitioning entropy coding (PIPE), or another context adaptive entropy coding method. CABAC is described in this disclosure for purposes of illustration, but is not limited with respect to the techniques broadly described in this disclosure. Also, the techniques are generally applicable to the coding of other types of data, e.g., in addition to video data.
Thus, in coding the last significant coefficient position information of a block and the significant coefficient position information of the block, the techniques of this disclosure may enable the use of a coding system having lower complexity relative to other systems, and a more efficient coding method relative to other methods. In this way, when using the techniques of this disclosure, there may be a relative bit savings for coded bitstreams that include information, and the complexity of the system used to code the information may be relatively reduced.
In one example, a method of coding coefficients associated with a block of video data during a video coding process includes coding information identifying a position of a last non-zero coefficient within the block according to a scanning order associated with the block prior to coding information identifying positions of other non-zero coefficients within the block, wherein coding the information identifying a position of a last non-zero coefficient within the block according to the scanning order includes at least one of: coding a one-dimensional position within the block that identifies a position of a last non-zero coefficient within the block according to the scanning order; coding a two-dimensional position within the block that identifies a position of a last non-zero coefficient within the block according to the scanning order; and coding a flag indicating whether a last non-zero coefficient within the block according to the scanning order is located within a range of positions within the block, and coding a one-dimensional position within the block when a last non-zero coefficient within the block according to the scanning order is located within the range, and otherwise coding a two-dimensional position within the block.
In another example, an apparatus for coding coefficients associated with a block of video data during a video coding process includes a video coder configured to: coding information identifying a position of a last non-zero coefficient within the block according to a scanning order associated with the block prior to coding information identifying positions of other non-zero coefficients within the block, wherein to code the information identifying a position of a last non-zero coefficient within the block according to the scanning order, the video coder is configured to perform at least one of: coding a one-dimensional position within the block that identifies a position of a last non-zero coefficient within the block according to the scanning order; coding a two-dimensional position within the block that identifies a position of a last non-zero coefficient within the block according to the scanning order; and coding a flag indicating whether a last non-zero coefficient within the block according to the scanning order is located within a range of positions within the block, and coding a one-dimensional position within the block when a last non-zero coefficient within the block according to the scanning order is located within the range, and otherwise coding a two-dimensional position within the block.
In another example, a method for coding coefficients associated with a block of video data during a video coding process comprises coding information identifying a position of a last non-zero coefficient within the block according to a scanning order associated with the block prior to coding information identifying positions of other non-zero coefficients within the block, wherein the coding information identifying a position of a last non-zero coefficient within the block according to the scanning order comprises at least one of: means for coding a one-dimensional position within the block that identifies a position of a last non-zero coefficient within the block according to the scanning order; means for coding a two-dimensional position within the block that identifies a position of a last non-zero coefficient within the block according to the scanning order; and means for: coding a flag that indicates whether a last non-zero coefficient within the block according to the scanning order is located within a range of positions within the block, and coding a one-dimensional position within the block when a last non-zero coefficient within the block according to the scanning order is located within the range, and otherwise coding a two-dimensional position within the block.
The techniques described herein may be implemented in hardware, software, firmware, or a combination thereof. If implemented in hardware, the apparatus may be embodied as an integrated circuit, a processor, discrete logic, or any combination thereof. If implemented in software, the software may be executed in one or more processors, such as a microprocessor, an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA), or a Digital Signal Processor (DSP). The software that executes the techniques may be initially stored in a tangible computer-readable medium and loaded into a processor and executed.
Accordingly, this disclosure also contemplates a computer-readable medium comprising instructions that when executed cause a processor to: coding information identifying a position of a last non-zero coefficient within a block according to a scanning order associated with the block prior to coding information identifying positions of other non-zero coefficients within the block, wherein the instructions that cause the processor to code the information identifying a position of a last non-zero coefficient within the block according to the scanning order comprise instructions that cause the processor to perform at least one of: coding a one-dimensional position within the block that identifies a position of a last non-zero coefficient within the block according to the scanning order; coding a two-dimensional position within the block that identifies a position of a last non-zero coefficient within the block according to the scanning order; and coding a flag indicating whether a last non-zero coefficient within the block according to the scanning order is located within a range of positions within the block, and coding a one-dimensional position within the block when a last non-zero coefficient within the block according to the scanning order is located within the range, and otherwise coding a two-dimensional position within the block.
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 of a video encoding and decoding system consistent with the techniques of this disclosure, which may implement techniques for coding last significant coefficient position information of a block of video data before coding the significant coefficient position information of the block.
Fig. 2 is a block diagram illustrating an example of a video encoder consistent with the techniques of this disclosure, which may implement techniques for encoding last significant coefficient position information of a block of video data before encoding the significant coefficient position information of the block.
Fig. 3 is a block diagram illustrating an example of a video decoder, consistent with the techniques of this disclosure, that may implement techniques for decoding encoded last significant coefficient position information of a block of video data before decoding the encoded significant coefficient position information of the block.
Fig. 4A-4C are conceptual diagrams illustrating examples of blocks of video data and corresponding significant-coefficient position information and last significant-coefficient position information.
Fig. 5A-5C are conceptual diagrams illustrating examples of blocks of video data scanned using a zig-zag scanning order, a horizontal scanning order, and a vertical scanning order.
Fig. 6A-6B are conceptual diagrams illustrating examples of last significant coefficient position information for a block of video data.
Fig. 7 is a flow diagram illustrating an example of a method for coding last significant coefficient position information for a block of video data before coding the significant coefficient position information for the block.
Fig. 8 is a flow diagram illustrating an example of a method for encoding last significant coefficient position information for a block of video data before encoding the significant coefficient position information for the block.
Fig. 9 is a flow diagram illustrating an example of a method for decoding encoded last significant coefficient position information for a block of video data prior to decoding the encoded significant coefficient position information for the block.
Detailed Description
This disclosure describes techniques for coding coefficients associated with a block of video data during a video coding process. The techniques include coding information identifying the position of the last non-zero (or "significant") coefficient within a block according to a scanning order associated with the block (i.e., the last significant coefficient position information for the block) prior to coding information identifying the positions of other significant coefficients within the block (i.e., the significant coefficient position information for the block). The techniques further include coding last significant coefficient position information of the block by performing at least one of: coding a one-dimensional position within a block that identifies a position of a last significant coefficient within the block according to a scan order; coding a two-dimensional position within a block that identifies a position of a last significant coefficient within the block according to a scan order; and coding a flag indicating whether a last significant coefficient within a block according to the scanning order is located within a range of positions within the block, and coding a one-dimensional position within the block when a last significant coefficient within the block according to the scanning order is located within the range, and otherwise coding a two-dimensional position within the block.
When coding the last significant coefficient position information of a block and the significant coefficient position information of the block, the techniques of this disclosure may allow for a coding system of lower complexity relative to other systems and may allow for more efficient coding methods relative to other methods.
In this disclosure, the term "coding" refers to encoding that occurs at an encoder or decoding that occurs at a decoder. Similarly, the term "coder" refers to an encoder, a decoder, or a combined encoder/decoder ("CODEC"). The terms coder, encoder, decoder, and CODEC all refer to a particular machine designed for coding (encoding and/or decoding) of video data consistent with this disclosure.
Coding the last significant-coefficient position information of a block before coding the block's significant-coefficient position information has the effect of separating these coding steps, which may enable the information to be coded in parallel, and may enable the use of coding systems having lower complexity than other systems. For example, instead of coding information in an interleaved manner as performed according to some techniques (e.g., by coding significant coefficient flags followed by coding the last significant coefficient flag for each coefficient of a block according to the scan order), the techniques of this disclosure separate the coding of information. Thus, using the techniques of this disclosure may enable information to be coded using parallel coding algorithms, and may result in information being coded with a coding system having lower complexity than other systems.
In addition, the availability of last significant coefficient position information prior to coding significant coefficient position information may enable the use of the last significant coefficient position information to code the information itself and other information of the block. In some examples, the last significant coefficient position information may be used as context for coding the information itself as well as for coding the significant coefficient position information, e.g., when performing a context adaptive entropy coding process (e.g., a Context Adaptive Binary Arithmetic Coding (CABAC) process) that includes applying a context model based on the context. Using the last significant coefficient position information in this manner may result in coding the information itself with accurate statistics, as well as coding the significant coefficient position information, which may enable more efficient coding of the information than when using other methods, e.g., using a smaller number of bits. For example, the context model may provide statistical or probabilistic estimates for the last significant coefficient position information or significant coefficient position information used to code the information as part of performing a context adaptive entropy coding process (e.g., a CABAC process). Furthermore, the probability estimates for the context models may be updated based on the coded information to reflect which last significant-coefficient position information or significant-coefficient position information is more or less likely to occur given the context. In particular, the updated probability estimates for the context models may be used to code subsequent blocks of video data using the same context models.
In other examples, the last significant coefficient position information may be used as syntax information for the coding information itself as well as for coding the significant coefficient position information, which may again enable the use of coding systems with lower complexity than other systems, and more efficient coding methods than other methods.
As one example, last significant coefficient position information may be used as syntax information to determine how to code the information itself, e.g., using different techniques to code the information depending on the position of the last significant coefficient within a block according to the scan order, which may enable more efficient coding of the information than when other methods are used. For example, in some cases, the significant coefficients of a block (including the last significant coefficient) may be concentrated, e.g., in a subset of block positions earlier in the scan order, while in other cases, the coefficients may be located throughout the block, e.g., within all or most of the scan order. In this example, coding a one-dimensional position may require using fewer bits than coding a two-dimensional position when the last significant coefficient is located earlier in the scan order. Similarly, coding a two-dimensional position may require using fewer bits than coding a one-dimensional position when the last significant coefficient is located later in the scan order.
Instead of coding the last significant coefficient position information using a fixed method, such as by coding a one-dimensional position or a two-dimensional position, the techniques of this disclosure may code a flag that indicates whether the last significant coefficient is located within a range of positions within the block. For example, the range may correspond to a position within the block that occurs relatively early in the scan order. The techniques may further code a one-dimensional position when the last significant coefficient is within the range, and otherwise code a two-dimensional position. Using last significant coefficient position information in this manner may enable more efficient coding of information than when using fixed methods or other methods.
As another example, the last significant-coefficient position information may be used as syntax information to determine a context for coding the significant-coefficient position information, e.g., when performing a context adaptive entropy coding process (e.g., a CABAC process) that includes applying a context model based on the context. For example, the significance of the coefficients within a block that precede the last significant coefficient according to scan order may be coded in the reverse scan order, i.e., starting with the last significant coefficient and proceeding to the first coefficient in scan order. In this example, the significance of each coefficient may be coded using the significance of previously coded coefficients as context, which may result in coding significant coefficient position information with accurate statistical or probability estimates, and enable more efficient coding of information than when other methods are used.
As yet another example, the last significant-coefficient position information may be used as syntax information to jointly code the significant-coefficient position information. For example, significant coefficient position information may be coded by arranging a plurality of coefficients that precede the last significant coefficient within a block according to scanning order into one or more groups, and jointly coding the significance of the coefficients within each group. Using the last significant coefficient position information in this manner may enable coding of the significant coefficient position information itself in parallel, which may again enable the use of coding systems having lower complexity than other systems, as well as more efficient coding of information than when using other methods.
The techniques of this disclosure may be used with any context adaptive entropy coding method, including CABAC, probability interval partitioning entropy coding (PIPE), or another context adaptive entropy coding method. CABAC is described in this disclosure for purposes of illustration, but is not limited with respect to the techniques broadly described in this disclosure. Also, the techniques are generally applicable to the coding of other types of data, e.g., in addition to video data.
Thus, in coding the last significant coefficient position information of a block and the significant coefficient position information of the block, the techniques of this disclosure may enable the use of coding systems having lower complexity than other systems, as well as more efficient coding methods relative to other methods. In this way, when using the techniques of this disclosure, there may be a relative bit savings for coded bitstreams that include information, and the complexity of the system used to code the information may be relatively reduced.
Fig. 1 is a block diagram illustrating an example of a video encoding and decoding system 10 consistent with the techniques of this disclosure, system 10 may implement techniques for coding the last significant coefficient position information of a block of video data before coding the significant coefficient position information of the block. As shown in fig. 1, system 10 includes a source device 12 that transmits encoded video to a destination device 14 via a communication channel 16. Source device 12 and destination device 14 may comprise any of a wide variety of devices. In some cases, source device 12 and destination device 14 may comprise wireless communication devices, such as wireless handsets, so-called cellular or satellite radiotelephones, or any wireless devices that may communicate video information over communication channel 16 (in which case communication channel 16 is wireless).
However, the techniques of this disclosure are not necessarily limited to wireless applications or settings, which involve coding the last significant coefficient position information of a block of video data before coding the significant coefficient position information of the block. These techniques are generally applicable to any situation in which encoding or decoding is performed, including: over-the-air television broadcasts, cable television transmissions, satellite television transmissions, streaming internet video transmissions, encoded digital video encoded onto or retrieved and decoded from a storage medium, or other scenarios. Thus, no communication channel 16 is required, and the techniques of this disclosure may be applied to settings such as when encoding is applied or decoding is applied, without any data communication between, for example, an encoding device and a decoding device.
In the example of fig. 1, source device 12 includes a video source 18, a video encoder 20, a modulator/demodulator (modem) 22, and a transmitter 24. Destination device 14 includes a receiver 26, a modem 28, a video decoder 30, and a display device 32. In accordance with this disclosure, video encoder 20 of source device 12 and/or video decoder 30 of destination device 14 may be configured to apply the techniques for coding the last significant coefficient position information of a block of video data before coding the significant coefficient position information of the block. 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 one example. Techniques for coding last significant coefficient position information for a block of video data before coding the significant coefficient position information for the block may be performed by any digital video encoding and/or decoding device. Although the techniques of this disclosure are typically 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 such coding devices, with source device 12 generating 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, such as 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 (video feed) from a video content provider. As another alternative, video source 18 may generate computer graphics-based data as the source video, or 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 applicable 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 modulated by modem 22 according to a communication standard and transmitted to destination device 14 via transmitter 24. Modem 22 may include various mixers, filters, amplifiers, or other components designed for signal modulation. Transmitter 24 may include circuitry designed for transmitting data, including amplifiers, filters, and one or more antennas.
Receiver 26 of destination device 14 receives information over channel 16, and modem 28 demodulates the information. Again, the video encoding process described above may implement one or more of the techniques described herein to code the last significant coefficient position information of a block of video data before coding the significant coefficient position information for the block. The information communicated over channel 16 may include syntax information defined by video encoder 20 that is also used by video decoder 30, including syntax elements that describe characteristics and/or processing of a block of video data (e.g., a macroblock or a coding unit), such as last significant coefficient position information and significant coefficient position information for the block, among other information. 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.
In the example of fig. 1, communication channel 16 may comprise any wireless or wired communication medium, such as a Radio Frequency (RF) spectrum or one or more physical transmission lines, or any combination of wireless and wired media. The communication channel 16 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. Communication channel 16 generally represents any suitable communication medium or collection of different communication media, including any suitable combination of wired or wireless media, for transmitting video data from source device 12 to destination device 14. Communication channel 16 may include a router, switch, base station, or any other apparatus that may be used to facilitate communications from source device 12 to destination device 14. In other examples, encoding or decoding devices may implement the techniques of this disclosure without any communication between these devices. For example, an encoding device may encode and store an encoded bitstream in accordance with the techniques of this disclosure. Alternatively, a decoding device may receive or retrieve an encoded bitstream and decode the bitstream in accordance with the techniques of this disclosure.
Video encoder 20 and video decoder 30 may operate in accordance with a video compression standard, such as the ITU-T h.264 standard, alternatively referred to as MPEG-4 part 10 Advanced Video Coding (AVC). However, the techniques of this disclosure are not limited to any particular coding standard. Other examples include MPEG-2, ITU-T H.263, and the High Efficiency Video Coding (HEVC) standard currently under development. In general, the techniques of this disclosure are described with respect to HEVC, but it should be understood that these techniques may also be used in conjunction with other video coding standards. 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 multiplexer-demultiplexer (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.
Video encoder 20 and video decoder 30 may each be implemented as any of a variety of suitable encoder and decoder circuits, such as one or more microprocessors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs), discrete logic, software, hardware, firmware or any combinations thereof. Each of video encoder 20 and video decoder 30 may be included in one or more encoders or decoders, either of video encoder 20 and video decoder 30 may be integrated as part of a combined encoder/decoder (CODEC) in a respective camera, computer, mobile device, subscriber device, broadcast device, set-top box, server, or the like.
A video sequence typically comprises a series of video frames. A group of pictures (GOP) generally comprises a series of one or more video frames. The GOP may include syntax data describing the number of frames included in the GOP in a header of the GOP, in a header of one or more frames of the GOP, or elsewhere. Each frame may include frame syntax data that describes an encoding mode for the respective frame. A video encoder, such as video encoder 20, typically operates on video blocks within individual video frames in order to encode video data. According to the ITU-T h.264 standard, video blocks may correspond to macroblocks or partitions of macroblocks. According to other standards (e.g., HEVC described in more detail below), video blocks may correspond to coding units (e.g., largest coding units), or partitions of coding units. The video blocks may have fixed or varying sizes, and may be different sizes according to a specified coding standard. Each video frame may include multiple slices, i.e., portions of the video frame. Each slice may include a plurality of video blocks, which may be arranged into partitions, also referred to as sub-blocks.
Depending on the specified coding standard, a video block may be partitioned into various "nxn" sub-block sizes, e.g., 16 x 16, 8 x 8, 4 x 4, 2 x 2, etc. In this disclosure, "nxn" and "N by N" may be used interchangeably to refer to the pixel size of a block in both the vertical and horizontal dimensions (e.g., 16 x 16 pixels or 16 by 16 pixels). In general, a 16 x 16 block will have sixteen pixels in the vertical direction (y =16) and sixteen 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. Further, the block does not necessarily 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. As one example, in the ITU-T h.264 standard, a block of size 16 by 16 pixels may be referred to as a macroblock, and a block smaller than 16 by 16 pixels may be referred to as a partition of a 16 by 16 macroblock. In other standards (e.g., HEVC), a block may be defined more generally with respect to its size, e.g., as a coding unit and its partitions, each of which has a varying, rather than fixed, size.
Video blocks may comprise blocks of pixel data in the pixel domain, or blocks of transform coefficients in the transform domain, such as after applying a transform, e.g., a Discrete Cosine Transform (DCT), an integer transform, a wavelet transform, or a conceptually similar transform, to residual data of a given video block, where the residual data represents pixel differences between the video data of the block and prediction data generated for the block. In some cases, a video block may comprise a block of quantized transform coefficients in the transform domain, where after applying a transform to the residual data of a given video block, the resulting transform coefficients are also quantized.
Block partitioning plays an important role in block-based video coding techniques. Using smaller blocks to code video data may result in better prediction of data of a video frame that includes locations of high levels of detail, and may thus reduce the resulting error (i.e., the deviation of the prediction data from the source video data) represented as residual data. Although potentially reducing residual data, these techniques may require additional syntax information to indicate how smaller blocks are partitioned relative to the video frame, and may result in increased coded video bitrates. Thus, in some techniques, block partitioning may depend on balancing the desired reduction of residual data with the resulting increase in bitrate of the coded video data caused by the additional syntax information.
In general, a block and its various partitions (i.e., sub-blocks) may be considered video blocks. In addition, a slice may be viewed as a plurality of video blocks (e.g., macroblocks or coding units), and/or sub-blocks (partitions or sub-coding units of a macroblock). Each slice may be an independently decodable unit of the video frame. Alternatively, the frame itself may be a decodable unit, or other portions of the frame may be defined as decodable units. Further, a GOP (also referred to as a sequence) may be defined as a decodable unit.
Efforts are currently underway to develop a new video coding standard, currently referred to as High Efficiency Video Coding (HEVC). The emerging HEVC standard may also be referred to as h.265. Standardization efforts are based on models of video coding devices, referred to as HEVC test model (HM). The HM assumes several capabilities of video coding devices over devices in accordance with, for example, ITU-T H.264/AVC. For example, although h.264 provides nine intra-prediction encoding modes, HM provides up to thirty-five intra-prediction encoding modes, e.g., based on the size of the intra-prediction coded block.
The HM treats a block of video data as a Coding Unit (CU). A CU may refer to a rectangular image region that serves as a base unit to which various coding tools are applied for compression. In h.264, it may also be referred to as a macroblock. Syntax data within the bitstream may define a Largest Coding Unit (LCU), which is the largest CU in terms of the number of pixels. In general, a CU has a similar purpose to a macroblock of h.264, except that the CU does not have a size difference. Thus, a CU may be split or "split" into sub-CUs.
The LCU may be associated with a quadtree data structure that indicates how to partition the LCU. In general, the quadtree data structure includes one node at each CU of an LCU, where the root node corresponds to the LCU and the other nodes correspond to sub-CUs of the LCU. If a given CU is split into four sub-CUs, the node in the quadtree that corresponds to the split CU includes four sub-nodes, each of which corresponds to one of the sub-CUs. Each node in the quadtree data structure may provide syntax information for the corresponding CU. For example, a node in a quadtree may include a split flag for a CU that indicates whether the CU corresponding to the node is split into four sub-CUs. Syntax information for a given CU may be defined recursively and may depend on whether the CU is split into sub-CUs.
An undivided CU (i.e., a CU corresponding to an end node or "leaf" node in a given quadtree) may include one or more Prediction Units (PUs). In general, a PU represents all or a portion of a corresponding CU, and includes data for retrieving reference samples for the PU for purposes of performing prediction of the CU. For example, when intra-mode encoding a CU, the PU may include data describing an intra-prediction mode for the PU. As another example, when inter-mode encoding a CU, the PU may include data defining a motion vector for the PU. The data defining a motion vector may describe, for example, a horizontal component of the motion vector, a vertical component of the motion vector, a resolution for the motion vector (e.g., one-quarter pixel precision or one-eighth pixel precision), a reference frame to which the motion vector points, and/or a reference list for the motion vector (e.g., list 0 or list 1). The data for the CU that defines one or more PUs of the CU may also describe, for example, partitioning the CU into one or more PUs. The partition mode may be different between whether a CU is not coded, encoded in an intra-prediction mode, or encoded in an inter-prediction mode.
A CU with one or more PUs may also include one or more Transform Units (TUs). After predicting a CU using one or more PUs as discussed above, the video encoder may calculate one or more residual blocks of the CU that correspond to respective portions of the one or more PUs. The residual block may represent pixel differences between the video data of the CU and prediction data of one or more PUs. The set of residual values may be transformed, scanned, and quantized to define a set of quantized transform coefficients. A TU may define a partition data structure that indicates partition information for transform coefficients, which is substantially similar to the quadtree data structure described above with reference to a CU. TUs are not necessarily limited to the size of a PU. Thus, a TU may be larger or smaller than a corresponding PU for the same CU. In some examples, the maximum size of a TU may correspond to the size of a corresponding CU. In one example, residual samples corresponding to a CU may be subdivided into smaller units using a quadtree structure referred to as a "residual quadtree" (RQT). In this case, the leaf nodes of the RQT may be referred to as TUs, whose corresponding residual samples may be transformed and quantized.
Following intra-prediction or inter-prediction encoding to generate prediction data and residual data, and following any transform used to generate the transform coefficients (e.g., the 4 x 4 or 8 x 8 integer transform or the discrete cosine transform DCT used in h.264/AVC), quantization of the transform coefficients may be performed. Quantization generally refers to a process of quantizing transform coefficients to possibly reduce the amount of data used to represent the coefficients. The quantization process may reduce the bit depth associated with some or all of the coefficients. For example, during quantization, an n-bit value may be rounded down to an m-bit value, where n is greater than m.
After quantization, entropy coding of the quantized data (i.e., the quantized transform coefficients) may be performed. Entropy coding may conform to the techniques of this disclosure relating to coding the last significant coefficient position information of a block of video data prior to coding the significant coefficient position information of the block, and other entropy coding techniques may also be used, such as Context Adaptive Variable Length Coding (CAVLC), CABAC, PIPE, or another entropy coding method. For example, coefficient values represented as the magnitude and corresponding sign (e.g., "+ 1" or "-1") of quantized transform coefficients may be encoded using entropy coding techniques.
It should be noted that the prediction, transform, and quantization described above may be performed for any block of video data, such as for a PU and/or TU of a CU, or for a macroblock, depending on the specified coding standard. Thus, the techniques of this disclosure relating to coding the last significant coefficient position information of a block of video data before coding the significant coefficient position information of the block may be applied to any block of video data, such as to any block of quantized transform coefficients, including a macroblock or a TU of a CU. Furthermore, a block of video data (e.g., a macroblock or a TU of a CU) may include each of a luma component (Y), a first chroma component (U), and a second chroma component (V) of the corresponding video data. Thus, the techniques of this disclosure may be performed for each of the Y, U and V components of a given block of video data.
To encode a block of video data as described above, information regarding the position of significant coefficients within a given block may also be generated and encoded. Subsequently, the values of the significant coefficients may be encoded, as described above. In h.264/AVC and the emerging HEVC standard, when a context adaptive entropy coding process (e.g., a CABAC process) is used, the positions of significant coefficients within a block of video data may be encoded prior to encoding the values of the significant coefficients within the block. The process of coding the positions of all significant coefficients within a block may be referred to as Significant Map (SM) coding. Fig. 4A-4C, described in more detail below, are conceptual diagrams illustrating examples of 4 x 4 blocks of quantized transform coefficients and corresponding SM data.
A typical SM encoding procedure can be described as follows. For a given block of video data, an SM may be encoded only when there is at least one significant coefficient within the block. The presence of significant coefficients within a given block of video data may be indicated in the coded block pattern (e.g., using the syntax element "coded _ block _ pattern," or CBP), which is a binary value coded for a set of blocks (e.g., luma and chroma blocks) associated with a region of pixels in the video data. Each bit in a CBP is referred to as a coding block flag (e.g., corresponding to a syntax element "coded block flag") and is used to indicate whether there is at least one significant coefficient within its corresponding block. In other words, the coding block flag is a one-bit symbol that indicates whether there are any significant coefficients within a single block of transform coefficients, and the CBP is a set of coding block flags for a set of related blocks of video data.
If the coding block flag indicates that no significant coefficients exist within the corresponding block (e.g., the flag is equal to "0"), no further information may be encoded for the block. However, if the coding block flag indicates that there is at least one significant coefficient within the corresponding block (e.g., the flag is equal to "1"), the SM may be encoded for the block following the coefficient scan order associated with the block. The scan order may define the order in which the significance of each coefficient within a block is encoded as part of SM encoding. In other words, the scan may serialize a two-dimensional block of coefficients into a one-dimensional representation to determine the significance of the coefficients. Different scanning orders (e.g., zig-zag, horizontal, and vertical) may be used. Fig. 5A-5C, also described in more detail below, illustrate examples of some of the various scan orders that may be used for an 8 x 8 block of video data. However, the techniques of this disclosure may also be used with respect to a wide variety of other scanning orders, including diagonal scanning orders, scanning orders that are combinations of zig-zag, horizontal, vertical, and/or diagonal scanning orders, and partially zig-zag, partially horizontal, partially vertical, and/or partially diagonal scanning orders. In addition, the techniques of this disclosure may also consider scanning orders that are themselves adaptive based on statistics associated with previously coded blocks of video data (e.g., blocks having the same block size or coding mode as the current block being coded). For example, in some cases, the adaptive scan order may be the scan order associated with the block.
Given a coding block flag indicating that there is at least one significant coefficient within a given block, and the scanning order for that block, the SM for the block may be encoded as follows. The two-dimensional blocks of quantized transform coefficients may first be mapped into a one-dimensional array using a scan order. For each coefficient in the array, a one-bit significant coefficient flag (e.g., corresponding to the syntax element "significant _ coeff _ flag") may be encoded following the scan order. That is, each position in the array may be assigned a binary value that may be set to "1" when the corresponding coefficient is valid and to "0" when the corresponding coefficient is not valid (i.e., zero). If the given significant coefficient flag is equal to "1" indicating that the corresponding coefficient is valid, an additional one-bit last significant coefficient flag (e.g., corresponding to syntax element "last _ significant _ coeff _ flag") may also be encoded, which may indicate whether the corresponding coefficient is the last significant coefficient within the array (i.e., within a block of the given scan order). Specifically, each last significant coefficient flag may be set to "1" when the corresponding coefficient is the last significant coefficient within the array, and otherwise set to "0". If the last array position is reached in this way, and the SM encoding process is not terminated because the last significant coefficient flag is equal to "1," it can be inferred that the last coefficient in the array (and thus the block of the given scan order) is valid, and the last significant coefficient flag cannot be encoded for the last array position.
Fig. 4B-4C are conceptual diagrams illustrating examples of sets of significant coefficient flags and last significant coefficient flags, respectively, corresponding to SM data of the block depicted in fig. 4A, presented in a diagram rather than an array. It should be noted that in other examples, the significant coefficient flag and the last significant coefficient flag as described above may be set to different values (e.g., the significant coefficient flag may be set to "0" when the corresponding coefficient is significant and to "1" when not significant, and the last significant coefficient flag may be set to "0" when the corresponding coefficient is the last significant coefficient and to "1" when not the last significant coefficient).
After the SM is encoded as described above, the value of each significant coefficient in the block (i.e., the magnitude and sign of each significant coefficient, e.g., as indicated by the syntax elements "coeff abs level minus" and "coeff sign flag," respectively) may also be encoded.
One drawback of the techniques described above is that the decision on the last significant coefficient position information (e.g., last significant coeff flag) for a particular coefficient of a coded block depends on the corresponding significant coefficient position information (e.g., significant coeff flag) for that coefficient. Due to the use of the interleaved coding techniques described above, video coders used to code information may have greater complexity relative to other systems. Furthermore, the last significant coefficient position information and significant coefficient position information may consume a high percentage of the overall compressed video bit rate if context models containing inaccurate statistics, or other useful syntax information, are used to inefficiently code when coding information by performing a context adaptive entropy coding process (e.g., a CABAC process). Accordingly, proper context model design and application, and the use of other useful syntax information, are very important to enable efficient coding of the last significant coefficient position information and significant coefficient position information, and to efficient overall video data compression.
Accordingly, this disclosure describes techniques that may enable a coding system of lower complexity (and/or improved compression) relative to other systems to be used when coding last significant coefficient position information and significant coefficient position information, and more efficiently code information than when using other methods. In particular, this disclosure provides techniques for coding last significant coefficient position information for a block of video data before coding the significant coefficient position information for the block. Coding the last significant-coefficient position information of a block before coding the block's significant-coefficient position information has the effect of separating these coding steps, which may enable the information to be coded in parallel, and may enable the use of coding systems having lower complexity than other systems.
In addition, this disclosure provides techniques for coding the information itself and the significant coefficient position information using the last significant coefficient position information. In some examples, the last significant coefficient position information may be used as context for coding the information itself as well as for coding the significant coefficient position information, e.g., when performing a context adaptive entropy coding process (e.g., a CABAC process) that includes applying a context model based on the context. In other words, the last significant-coefficient position information may be used as syntax information for the coding information itself as well as for coding the significant-coefficient position information.
As one example, video encoder 20 of source device 12 may be configured to encode certain blocks of video data (e.g., one or more macroblocks, or TUs of a CU), and video decoder 30 of destination device 14 may be configured to receive the encoded video data from a video encoder (e.g., from modem 28 and receiver 26). According to the techniques of this disclosure, as one example, video encoder 20 and/or video decoder 30 may be configured to code information identifying a position of a last significant coefficient within a block according to a scanning order associated with the block prior to coding information identifying positions of other significant coefficients within the block, wherein to code the information identifying the position of the last significant coefficient within the block according to the scanning order, video encoder 20 and/or video decoder 30 may be configured to perform at least one of: coding a one-dimensional position within a block that identifies a position of a last significant coefficient within the block according to a scan order; coding a two-dimensional position within a block that identifies a position of a last significant coefficient within the block according to a scan order; and coding a flag indicating whether a last significant coefficient within a block according to the scanning order is located within a range of positions within the block, and coding a one-dimensional position within the block when a last significant coefficient within the block according to the scanning order is located within the range, and otherwise coding a two-dimensional position within the block.
As one example, to code a one-dimensional position within a block, video encoder 20 and/or video decoder 30 may be configured to code last significant coefficient position information using a scan order. For example, video encoder 20 and/or video decoder 30 may code bits (or "bins") for each of one or more coefficients in scan order, i.e., starting from the first coefficient in scan order and ending with the last significant coefficient. In this example, video encoder 20 and/or video decoder 30 may code each bin by performing a context adaptive entropy coding process (e.g., a CABAC process) that includes applying a context model based on at least one context, where the at least one context may include positions of coefficients corresponding to bins within a block according to a scanning order. A probability estimate of a context model used to code each bin may indicate a likelihood that the bin is equal to a particular value (e.g., "0" or "1").
As another example, to code a two-dimensional position within a block, video encoder 20 and/or video decoder 30 may be configured to use the last significant coefficient position information as context for the coding information itself. In the following example, the two-dimensional position may include the horizontal and vertical coordinates (e.g., x and y coordinates) of the last significant-coefficient position within the block, where the horizontal coordinate corresponds to the column number of the position and the vertical coordinate corresponds to the row number of the position. For example, the row and column numbers may be relative to a row and column number corresponding to a reference (or "original") position within the block (e.g., the top left block position, also referred to as the "DC" position).
Additionally, in the following examples, each coordinate may be represented as a sequence of one or more binary values, or "binarized," where the sequence includes a unary codeword that includes the one or more binary values. Again, the probability estimate of the context model used to code each bin may indicate the likelihood that the bin is equal to a particular value (e.g., "0" or "1"). In these examples, each binary value in a given unary codeword may correspond to a row number or column number that begins with the row or column of the original position within the block and ends with the row or column corresponding to the last significant coefficient position within the block. In some examples, the binary value corresponding to the last significant coefficient position may be set to a value of "0" while all remaining binary values of the codeword may be set to a value of "1". In other examples, the binary value may be set to other values. It should be noted that in other examples consistent with the techniques of this disclosure, other types of codewords may be used, such as truncated unary codewords, exponential golomb codewords, collocated codewords, and combinations of various coding techniques.
In one example, video encoder 20 and/or video decoder 30 may code each bin of a unary codeword for a given coordinate by performing a context adaptive entropy coding process (e.g., a CABAC process) that includes applying a context model based on at least one context, where the at least one context may include a position of the bin within the unary codeword. As previously described, the position of a binary value within a unary codeword may correspond to a row number or a column number within the block that corresponds to the position of the binary value. In other words, the context used to code a bin may be the position within the block in the x or y direction that corresponds to the bin.
In some cases, the horizontal and vertical coordinates of the last significant-coefficient position may be related. For example, if the horizontal coordinate is equal to a small value, the vertical coordinate is more likely equal to a small value than a large value. That is, different values for one coordinate may result in different statistics for another coordinate, i.e., different probability estimates for the binary values of the unary codeword for another coordinate. Thus, when one coordinate corresponding to a last significant coefficient position is coded using statistics of the coordinate, e.g., when performing a context adaptive entropy coding process (e.g., a CABAC process), using statistics including information about the value of the other coordinate may result in the statistics being accurate, and thus efficient coding may be achieved.
Thus, in another example, when the last significant coefficient position information is coded with one coordinate (e.g., vertical) coded after another coordinate (e.g., horizontal), video encoder 20 and/or video decoder 30 may code each bin of a unary codeword for one coordinate by performing a context adaptive entropy coding process (e.g., a CABAC process) that includes applying a context model based on at least one context, wherein the at least one context may include a position of the bin within the unary codeword as described above, as well as a value of another coordinate previously coded.
Similarly, in some cases, different values of the binary value of a unary codeword for one coordinate of the last significant coefficient position may result in different probability estimates of the binary value of a unary codeword for another coordinate. Thus, when a bin of a unary codeword for one coordinate of a last significant coefficient position is coded using a probability estimate corresponding to the bin as described above, using a probability estimate that includes information about the value of the bin (e.g., corresponding bin) of a unary codeword for another coordinate may result in the probability estimate being accurate, and thus efficient coding may be achieved.
For example, to code horizontal and vertical coordinates, video encoder 20 and/or video decoder 30 may be configured to code at least one bin of a sequence corresponding to one of the coordinates based at least in part on a value of the at least one bin of the sequence corresponding to the other coordinate. For example, at least one binary value of a sequence corresponding to another coordinate may be a binary value corresponding to at least one binary value of a sequence corresponding to one of the coordinates, e.g., the binary values may be located in the same or similar binary value positions within their respective codewords. As one example, to code at least one bin of a sequence corresponding to one of the coordinates based at least in part on a value of the at least one bin of the sequence corresponding to the other coordinate, video encoder 20 and/or video decoder 30 may be configured to perform a context adaptive entropy coding process that includes applying a context model based on at least one context, wherein the at least one context includes a value of the at least one bin of the sequence corresponding to the one of the coordinates. Thus, in yet another example, when coding last significant coefficient position information, video encoder 20 and/or video decoder 30 may code horizontal and vertical coordinates in an interleaved manner using previously coded bins as contexts. That is, video encoder 20 and/or video decoder 30 may code each bin of a unary codeword for a given coordinate by performing a context adaptive entropy coding process (e.g., a CABAC process) that includes applying a context model based on at least one context, where the at least one context may include a position of the bin within the unary codeword as previously described, and values of one or more previously coded bins of the unary codeword for another coordinate.
In addition, in general, video encoder 20 and/or video decoder 30 may be configured to code one or more bins of a sequence corresponding to one coordinate and one or more bins of a sequence corresponding to another coordinate in an interleaved manner. In some examples, video encoder 20 and/or video decoder 30 may code the individual bins of each codeword in an interleaved manner. In other examples, video encoder 20 and/or video decoder 30 may code the group of bins for each codeword in an interleaved manner. For example, at least one bin of each of one or more bins of a sequence corresponding to one coordinate and one or more bins of a sequence corresponding to another coordinate may comprise a bin encoded using a conventional coding mode, and at least one bin of each of the sequences may comprise a bin coded using a bypass coding mode.
In this example, to code one or more bins of a sequence corresponding to one coordinate and one or more bins of a sequence corresponding to another coordinate in an interleaved manner, video encoder 20 and/or video decoder 30 may be configured to code at least one bin of the one or more bins of the sequence corresponding to the one coordinate coded using a conventional coding mode prior to coding at least one bin of the one or more bins of the sequence corresponding to the other coordinate coded using the conventional coding mode, at least one bin of the one or more bins of the sequence corresponding to the one coordinate coded using the bypass coding mode is then coded before at least one bin of the one or more bins of the sequence corresponding to the other coordinate coded using the bypass coding mode is coded. In other examples, video encoder 20 and/or video decoder 30 may be configured to code the bins of a sequence coded using the bypass coding mode together.
In yet another example, video encoder 20 may arrange the block coefficients into a continuous sequence based on the scan order (i.e., serialize the coefficients), and map the coefficients into a second block using a second scan order, where the second block is different from the first block, and the second scan order is different from the first scan order. Subsequently, video encoder 20 may encode the last significant coefficient position within the second block according to the second scanning order using the horizontal and vertical coordinates, as previously described. Video decoder 30 may, in turn, decode the horizontal and vertical coordinates of the last significant coefficient position within the second block according to the second scanning order, arrange the block coefficients into a continuous sequence based on the second scanning order, and map the coefficients into a third different block using a third different scanning order.
In this example, the significant coefficients of the original block (including the last significant coefficient) may be more likely to be located earlier in the original scan order than later. Video encoder 20 and/or video decoder 30 performing the above steps may cause the probability that a given position within the second block contains the last significant coefficient to vary depending on the horizontal and vertical coordinates of the position. For example, where the second scanning order is a horizontal scanning order, the probability that the last significant coefficient is located in the first row of the second block may be higher than the probability that the last significant coefficient is located in a later row. Also, for a given row, the probability that the last significant coefficient is located in the first column of the second block (i.e., earlier in the row) may be higher than the probability that the last significant coefficient is located in a later column (i.e., later in the row). In other words, different values of one coordinate may result in different probability estimates of the binary value of a unary codeword of another coordinate. In addition, different positions of the binary value of a unary codeword of another coordinate within the codeword may result in different probability estimates of the binary value of the codeword. That is, different row numbers or column numbers within the second block corresponding to the position of a binary value may result in different probability estimates for the binary value. A similar phenomenon may occur when the second scanning order is another scanning order (e.g., a vertical scanning order).
In this example, when one coordinate corresponding to the last significant-coefficient position within the second block is coded using statistics of the one coordinate (i.e., a probability estimate of the bin of the unary codeword for the one coordinate), using statistics that include information about the value of the other coordinate, as well as the position of the bin of the unary codeword for the one coordinate within the codeword, may result in the statistics being accurate, and thus efficient coding may be achieved. Thus, in this example, when the last significant coefficient position information is coded with one coordinate coded after another coordinate, video encoder 20 and/or video decoder 30 may code each bin of a unary codeword for one coordinate by performing a context adaptive entropy coding process (e.g., a CABAC process) that includes applying a context model based on at least one context, where the at least one context may include a position of the bin within the unary codeword as described above, as well as a value of another coordinate previously coded.
As illustrated by the above example, video encoder 20 and/or video decoder 30 may use the last significant coefficient position information as context for the coding information itself. In other examples, video encoder 20 and/or video decoder 30 may use the last significant-coefficient position information as context for coding the significant-coefficient position information, e.g., by performing a context adaptive entropy coding process (e.g., a CABAC process) that includes applying a context model based on the context. In these examples, the probability estimate of the context model used to code significant coefficient position information may indicate the probability that a particular coefficient is significant (e.g., the probability that the significant coefficient flag of the coefficient is equal to "0" or "1"). In particular, video encoder 20 and/or video decoder 30 may use the last significant coefficient position as context to code the significance of the coefficient located before the last significant coefficient within the block according to the scan order.
As one example, the last significant coefficient position in the scan order that is above a given position threshold may correspond to one context, while positions at or below the position threshold may correspond to another context. In this example, the probability that a particular one of the coefficients is significant may vary depending on whether the coefficient is located earlier or later in the scan order, as indicated by the last significant coefficient position. That is, different last significant coefficient positions may result in different statistics of the significance of the coefficients.
In a similar manner as described above, in this example, when significant coefficient position information is coded using corresponding statistics (i.e., a probability estimate of the significance of each coefficient), using statistics that include information about the last significant coefficient position may result in the statistics being accurate, and thus efficient coding may be achieved. Thus, in this example, when coding significant coefficient position information, video encoder 20 and/or video decoder 30 may code the significance of each coefficient by performing a context adaptive entropy coding process (e.g., a CABAC process) that includes applying a context model based on at least one context, where the at least one context may include a last significant coefficient position, and a position of a coefficient within a block, e.g., according to a scan order.
As another example, video encoder 20 and/or video decoder 30 may use the last significant coefficient position information as syntax information for coding the significant coefficient position information. In one example, video encoder 20 and/or video decoder 30 may code significant coefficient position information using the last significant coefficient position information, which uses the significant coefficient position information itself as context.
For example, video encoder 20 and/or video decoder 30 may code the significant coefficient position information by coding the significance of the coefficients located before the last significant coefficient within the block according to the scanning order in a reverse scanning order, starting from the last significant coefficient and proceeding to the first coefficient in the scanning order (e.g., corresponding to the DC position). Video encoder 20 and/or video decoder 30 may code the significance of each coefficient by using the significance of previously coded coefficients as contexts, such as again by performing a context adaptive entropy coding process (e.g., a CABAC process) that includes applying a context model based on the contexts.
In this way, the probability estimates of the context models used to code the significance of each coefficient may incorporate knowledge of the significance of coefficients located later in the original scanning order, which may result in accurate probability estimates being used, and thus may enable efficient coding. Furthermore, this significance information cannot be obtained using other techniques because, for a given coefficient, the significance of the coefficient located later in the original scan order may not be known.
As yet another example, video encoder 20 and/or video decoder 30 may jointly code significant coefficient position information using the last significant coefficient position information. For example, according to some techniques, the significance of a coefficient is coded one coefficient at a time. In other words, whether the coefficients are valid is determined sequentially for each coefficient according to the scan order. In accordance with the techniques of this disclosure, video encoder 20 and/or video decoder 30 may use the last significant coefficient position information to arrange the plurality of coefficients located before the last significant coefficient within the block into one or more groups according to the scanning order, and jointly code the significance of the coefficients within each group, which may again enable parallel coding implementations and efficient coding.
For example, for each group, video encoder 20 and/or video decoder 30 may generate a flag that indicates whether the coefficients within the group are all zero values, and a significant coefficient flag for each of the coefficients that indicates whether the respective coefficient is significant when at least one of the coefficients is significant.
As yet another example, video encoder 20 and/or video decoder 30 may use the last significant coefficient position information as syntax information for the coding information itself. For example, in some cases, the significant coefficients of a block (including the last significant coefficient) may be concentrated in a subset of block positions that are earlier in the scan order and very close to the DC position, for example, while in other cases, the coefficients may be located everywhere in the block, such as within all or most of the scan order.
In this example, coding the one-dimensional last significant coefficient position may require using fewer bits than coding the two-dimensional last significant coefficient position when the last significant coefficient is located earlier in the scan order. Similarly, coding a two-dimensional position may require using fewer bits than coding a one-dimensional position when the last significant coefficient is located later in the scan order.
Thus, instead of coding the last significant coefficient position using a fixed method (e.g., by coding a one-dimensional or two-dimensional position), video encoder 20 and/or video decoder 30 may exploit this phenomenon by: a flag is coded that indicates whether the last significant coefficient is located within a range of positions within the block, and a one-dimensional position is coded when the last significant coefficient is located within the range and a two-dimensional position is coded otherwise. In other words, video encoder 20 and/or video decoder 30 may use the position of the last significant coefficient relative to the range to indicate whether the last significant coefficient is located earlier or later in the scan order.
For example, a range may be defined as a sub-block within a block (e.g., a 4 × 4 sub-block within a 16 × 16 block), or as a range of positions of a block according to a scanning order, such as the first 10 positions in the scanning order. Thus, video encoder 20 and/or video decoder 30 may code the last significant coefficient position information differently depending on the information itself, which may enable efficient coding.
Accordingly, the techniques of this disclosure may enable video encoder 20 and/or video decoder 30 to have lower complexity relative to other systems, and may enable video encoder 20 and/or video decoder 30 to code last significant coefficient position information and significant coefficient position information more efficiently than when other methods are used. In this way, when using the techniques of this disclosure, there may be a relative bit savings for coded bitstreams that include information, and the complexity of video encoder 20 and/or video decoder 30 to code the information may be relatively reduced.
Video encoder 20 and video decoder 30, as applicable, may each be implemented as any of a variety of suitable encoder or decoder circuits, such as one or more microprocessors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs), discrete logic 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). An apparatus including video encoder 20 and/or video decoder 30 may comprise an integrated circuit, a microprocessor, and/or a wireless communication device such as a cellular telephone.
Fig. 2 is a block diagram illustrating an example of video encoder 20 consistent with the techniques of this disclosure, video encoder 20 may implement techniques for encoding the last significant coefficient position information of a block of video data before encoding the significant coefficient position information of the block. Video encoder 20 may perform intra and inter coding of blocks within a video frame, including macroblocks or CUs, or partitions or sub-partitions thereof. Intra-coding relies on spatial prediction to reduce or remove spatial redundancy in video within a given video frame. Inter-coding relies on temporal prediction to reduce or remove temporal redundancy in video within neighboring frames of a video sequence. An intra-mode (I-mode) may refer to any of several spatially-based compression modes, and an inter-mode (e.g., unidirectional prediction (P-mode) or bi-directional prediction (B-mode)) may refer to any of several temporally-based compression modes.
As shown in fig. 2, video encoder 20 receives a current block of video data to be encoded within a video frame. In the example of fig. 2, video encoder 20 includes motion compensation unit 44, motion estimation unit 42, memory 64, summer 50, transform module 52, quantization unit 54, and entropy encoding unit 56. For video block reconstruction, video encoder 20 also includes an inverse quantization unit 58, an inverse transform module 60, and a summer 62. A deblocking filter (not shown in fig. 2) may also be included to filter block boundaries to remove blockiness artifacts from the reconstructed video. The deblocking filter typically filters the output of summer 62, if desired.
During the encoding process, video encoder 20 receives a video frame or slice to be coded. A frame or slice may be divided into a plurality of video blocks. Motion estimation unit 42 and motion compensation unit 44 may perform inter-prediction coding of a given received video block relative to one or more blocks in one or more reference frames to provide temporal compression. Intra-prediction module 46 may perform intra-prediction coding of a given 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 compression.
Mode select unit 40 may select one of the coding modes (i.e., one mode or multiple intra or inter coding modes) based on the coding results (e.g., the resulting coding rate and degree of distortion) and based on the frame or slice type of the frame or slice that includes the given received block being coded, 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 in a reference frame or reference slice. In general, intra-prediction involves predicting the current block relative to neighboring previously coded blocks, while inter-prediction involves motion estimation and motion compensation to temporally predict the current block.
Motion estimation unit 42 and motion compensation unit 44 represent inter-prediction elements of video encoder 20. Motion estimation unit 42 and motion compensation unit 44 may be highly integrated, but are illustrated separately for conceptual purposes. Motion estimation is the process of generating motion vectors that estimate the motion of video blocks. A motion vector, for example, may indicate the displacement of a prediction block within a prediction reference frame (or other coded unit) relative to a current block being coded within a current frame (or other coded unit). A prediction 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. The motion vector may also indicate a displacement of a partition of the block. Motion compensation may involve fetching or generating a prediction block based on a motion vector determined by motion estimation. Also, in some examples, motion estimation unit 42 and motion compensation unit 44 may be functionally integrated.
Motion estimation unit 42 may calculate motion vectors for video blocks of inter-coded frames by comparing video blocks of inter-coded frames to video blocks of reference frames in memory 64. For purposes of this comparison, motion compensation unit 44 may also interpolate sub-integer pixels of a reference frame (e.g., an I frame or a P frame). As an example, the ITU h.264 standard describes two lists: list 0, which contains reference frames having an earlier display order than the current frame being encoded, and list 1, which contains reference frames having a later display order than the current frame being encoded. Thus, the data stored in the memory 64 may be organized according to these lists.
Motion estimation unit 42 may compare blocks of one or more reference frames from memory 64 to a block to be encoded of a current frame (e.g., a P-frame or a B-frame). When the reference frame in memory 64 includes values for sub-integer pixels, the motion vectors calculated by motion estimation unit 42 may refer to sub-integer pixel positions of the reference frame. Motion estimation unit 42 and/or motion compensation unit 44 may also be configured to calculate values for sub-integer pixel positions of the reference frame stored in memory 64 when no values for sub-integer pixel positions are stored in memory 64. Motion estimation unit 42 may send the calculated motion vectors to entropy encoding unit 56 and motion compensation unit 44. The reference frame block identified by the motion vector may be referred to as an inter-prediction block, or more generally, a prediction block. Motion compensation unit 44 may calculate prediction data based on the prediction block.
Intra-prediction module 46 may intra-predict the current block as an alternative to inter-prediction performed by motion estimation unit 42 and motion compensation unit 44 as described above. In particular, intra-prediction module 46 may determine the intra-prediction mode used to encode the current block. In some examples, intra-prediction module 46 may encode the current block using various intra-prediction modes, e.g., during separate encoding processes, and intra-prediction module 46 (or mode select unit 40, in some examples) may select an appropriate intra-prediction mode from the tested modes for use. For example, intra-prediction module 46 may calculate rate-distortion values using rate-distortion analysis for various tested intra-prediction modes, and select the intra-prediction mode with the best rate-distortion characteristics among the tested modes. Rate-distortion analysis typically determines the amount of distortion (or error) between an encoded block and the original, unencoded block that was encoded to produce the encoded block, as well as the bit rate (i.e., number of bits) used to produce the encoded block. Intra-prediction module 46 may calculate the ratio of distortion and rate for various encoded blocks to determine which intra-prediction mode exhibits the best rate-distortion value for the block.
After predicting the current block, e.g., using intra-prediction or inter-prediction, video encoder 20 may form a residual video block by subtracting prediction data calculated by motion compensation unit 44 or intra-prediction module 46 from the original video block being coded. Summer 50 represents one or more components that may perform this subtraction operation. Transform module 52 may apply 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 module 52 may perform other transforms conceptually similar to DCT, such as the transform defined by the h.264 standard. Wavelet transforms, integer transforms, sub-band transforms, or other types of transforms may also be used. In any case, transform module 52 may apply a transform to the residual block, producing a block of residual transform coefficients. The transform may convert the residual information from the pixel domain to a transform domain (e.g., the frequency domain). Quantization unit 54 may quantize the residual 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 degree of quantization may be modified by adjusting the quantization parameter.
After quantization, entropy encoding unit 56 may entropy code the quantized transform coefficients using the techniques of this disclosure for coding the last significant coefficient position information of a block of video data prior to coding the significant coefficient position information of the block. However, for other types of syntax elements, entropy encoding unit 56 may perform other entropy coding techniques, which may include CAVLC, CABAC, PIPE, or another entropy coding technique. After entropy coding by entropy encoding unit 56, the encoded video may be transmitted to another device or archived for later transmission or retrieval.
In some cases, entropy encoding unit 56 or another unit of video encoder 20 may be configured to perform other coding functions in addition to entropy coding quantized transform coefficients as described above. For example, entropy encoding unit 56 may construct header information for a block (e.g., a macroblock, CU, or LCU) or a video frame containing a block with appropriate syntax elements for transmission in an encoded video bitstream. According to some coding standards, these syntax elements may include the last significant coefficient position information and significant coefficient position information for the block as previously described. As also previously described, coding such information according to some techniques may require the use of coding systems having greater complexity relative to other systems, and the resulting coded information may consume a high percentage of the overall compressed video bit rate when coded inefficiently. As such, this disclosure describes techniques that may enable a coding system of lower complexity relative to other systems to be used when coding last significant coefficient position information and significant coefficient position information, and more efficiently code information than when using other methods.
As one example, entropy encoding unit 56 of video encoder 20 may be configured to encode certain blocks of video data (e.g., one or more macroblocks, or TUs of a CU). For example, as described above with reference to fig. 1, entropy encoding unit 56 may be configured to code information identifying a position of a last significant coefficient within a block of video data according to a scanning order associated with the block prior to coding information identifying positions of other significant coefficients within the block, wherein to code information identifying a position of a last significant coefficient within the block according to the scanning order, entropy encoding unit 56 may be configured to perform at least one of: coding a one-dimensional position within a block that identifies a position of a last significant coefficient within the block according to a scan order; coding a two-dimensional position within a block that identifies a position of a last significant coefficient within the block according to a scan order; and coding a flag indicating whether a last significant coefficient within a block according to the scanning order is located within a range of positions within the block, and coding a one-dimensional position within the block when a last significant coefficient within the block according to the scanning order is located within the range, and otherwise coding a two-dimensional position within the block.
As one example, to code a one-dimensional position within the block, entropy encoding unit 56 may be configured to, for each of one or more coefficients associated with the block, start with the first coefficient within the block according to the scanning order and end with the last significant coefficient within the block according to the scanning order, and proceed according to the scanning order, determine whether the coefficient is the last significant coefficient within the block according to the scanning order, and generate a last significant coefficient flag that indicates whether the coefficient is the last significant coefficient within the block according to the scanning order. Entropy encoding unit 56 may be further configured to arrange the last significant coefficient flags for one or more coefficients into a consecutive sequence based on the scanning order, and encode the sequence.
As another example, to code a two-dimensional position within a block, entropy encoding unit 56 may be configured to determine a horizontal coordinate of the position of the last significant coefficient within the block according to the scanning order, determine a vertical coordinate of the position of the last significant coefficient within the block according to the scanning order, and encode the horizontal coordinate and the vertical coordinate. In this example, the block may be a first block, the scanning order may be a first scanning order, and entropy encoding unit 56 may be further configured to arrange coefficients associated with the second block into a consecutive sequence based on a second scanning order, wherein the second block is different from the first block, and the second scanning order is different from the first scanning order, and map the sequence into the first block using the first scanning order to generate the first block.
Also in this example, as previously described, to encode each of the horizontal and vertical coordinates, entropy encoding unit 56 may be configured to binarize the respective coordinate such that the coordinate comprises a sequence of one or more bins, and encode the sequence. For example, the sequence of one or more binary values may comprise one of a unary codeword, a truncated unary codeword, an exponential golomb codeword, and a collocated codeword.
As an example, the truncated unary codeword may include: in the case where the respective coordinate has a value less than a predetermined truncated value, is a unary codeword comprising a variable number of first symbols (e.g., "1") followed by a second symbol (e.g., "0"), the variable number corresponding to the value of the coordinate, where the first symbol is different from the second symbol; and a predetermined number of first symbols, the predetermined number corresponding to a truncated value, if the coordinate has a value greater than or equal to the truncated value.
As another example, the concatenated codeword may comprise a concatenation of a first codeword (e.g., a codeword generated using a first coding method) and a second codeword (e.g., a codeword generated using a second coding method), wherein the first codeword is different from the second codeword. In this example, the concatenated codeword may be used if the block of video data is large enough such that using the unary codeword or the truncated unary codeword to represent the respective coordinate may require more bits than using the concatenated codeword.
As also described previously, to encode the horizontal and vertical coordinates, entropy encoding unit 56 may be configured to encode at least one bin of the sequence corresponding to one of the coordinates based at least in part on a value of the at least one bin of the sequence corresponding to the other coordinate. As one example, to encode at least one bin of a sequence corresponding to one of the coordinates based at least in part on a value of the at least one bin of the sequence corresponding to the other coordinate, entropy encoding unit 56 may be configured to perform a context adaptive entropy coding process that includes applying a context model based on at least one context, wherein the at least one context includes a value of the at least one bin of the sequence corresponding to the one of the coordinates.
In addition, entropy encoding unit 56 may be configured to encode one or more bins of a sequence corresponding to one coordinate and one or more bins of a sequence corresponding to another coordinate, typically in an interleaved manner. For example, at least one bin of each of one or more bins of a sequence corresponding to one coordinate and one or more bins of a sequence corresponding to another coordinate may comprise a bin coded using a conventional coding mode, and at least one bin of each of the sequences may comprise a bin coded using a bypass coding mode.
In this example, to encode one or more bins of a sequence corresponding to one coordinate and one or more bins of a sequence corresponding to another coordinate in an interleaved manner, entropy encoding unit 56 may be configured to encode at least one bin of the one or more bins of the sequence corresponding to the one coordinate coded using a conventional coding mode prior to encoding at least one bin of the one or more bins of the sequence corresponding to the other coordinate coded using a conventional coding mode, at least one bin of the one or more bins of the sequence corresponding to the one coordinate coded using the bypass coding mode is then encoded before at least one bin of the one or more bins of the sequence corresponding to the other coordinate coded using the bypass coding mode is encoded. In other examples, entropy encoding unit 56 may be configured to encode the bins of a sequence coded using the bypass coding mode together.
As another example, to code significant coefficient position information, where the scanning order may be a first scanning order, entropy encoding unit 56 may be configured to, for each of one or more coefficients associated with the block, start with a last significant coefficient within the block according to the scanning order and end with a first coefficient within the block according to the scanning order, and continue according to a second scanning order that is reversed relative to the first scanning order, determine whether the coefficient is a significant coefficient, and generate a significant coefficient flag that indicates whether the coefficient is a significant coefficient. Entropy encoding unit 56 may be further configured to arrange the significant coefficient flags for one or more coefficients into a consecutive sequence based on a second scanning order, and encode the sequence.
As one example, to code significant coefficient position information, entropy encoding unit 56 may be configured to arrange one or more coefficients associated with the block into one or more groups, starting with the first coefficient within the block according to the scanning order and ending with the last significant coefficient within the block according to the scanning order, and continuing according to the scanning order, wherein each of the one or more groups comprises one or more of the coefficients. Entropy encoding unit 56 may be configured to, for each of the one or more groups, determine whether one or more of the coefficients are significant coefficients and generate one or more flags, wherein the one or more flags comprise a group flag indicating whether one or more of the coefficients are all zero-valued (i.e., non-significant) coefficients, and when at least one of the one or more of the coefficients is a significant coefficient, the one or more flags further comprise a significant coefficient flag for each of the one or more of the coefficients, the significant coefficient flag indicating whether the respective coefficient is a significant coefficient. Entropy encoding unit 56 may still be further configured to arrange the one or more flags for the one or more groups into a contiguous sequence based on the scanning order, and encode the sequence.
In yet another example, to code last significant coefficient position information, and to code significant coefficient position information, entropy encoding unit 56 may be configured to perform a context adaptive entropy coding process (e.g., a CABAC process) that includes entropy encoding unit 56 applying a context model based on at least one context, wherein the at least one context includes one of last significant coefficient position information and significant coefficient position information. As one example, to encode a sequence of one or more bins corresponding to each of a horizontal coordinate and a vertical coordinate, entropy encoding unit 56 may be configured to encode each bin in the sequence by performing a context adaptive entropy coding process that includes applying a context model based on at least one context, wherein the at least one context includes a position of the respective bin within the sequence. As previously described, the position of a binary value within a sequence may correspond to a row number or a column number within a block that corresponds to the position of the binary value. In other words, the context used to code a bin may be the position within the block in the x or y direction that corresponds to the bin. In this example, entropy encoding unit 56 configured as described may enable entropy encoding unit 56 to code information more efficiently using a smaller number of bits than when using other methods, for example.
As such, the techniques of this disclosure may enable entropy encoding unit 56 to have lower complexity relative to other systems and may enable entropy encoding unit 56 to code last significant coefficient position information and significant coefficient position information more efficiently than when using other methods. In this way, when using the techniques of this disclosure, there may be a relative bit savings for coded bitstreams that include information, and the complexity of entropy encoding unit 56 used to code the information may be relatively reduced.
Inverse quantization unit 58 and inverse transform module 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 prediction block of one of the frames of 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 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 memory 64. The reconstructed video block may be used by motion estimation unit 42 and motion compensation unit 44 as a reference block for inter-coding a block in a subsequent video frame.
In this manner, video encoder 20 represents an example of a video coder configured to code information identifying a position of a last significant coefficient within a block of video data according to a scanning order associated with the block prior to coding information identifying positions of other significant coefficients within the block, wherein to code the information identifying a position of a last significant coefficient within the block according to the scanning order, the video coder is configured to perform at least one of: coding a one-dimensional position within a block that identifies a position of a last significant coefficient within the block according to a scan order; coding a two-dimensional position within a block that identifies a position of a last significant coefficient within the block according to a scan order; and coding a flag indicating whether a last significant coefficient within a block according to the scanning order is located within a range of positions within the block, and coding a one-dimensional position within the block when a last significant coefficient within the block according to the scanning order is located within the range, and otherwise coding a two-dimensional position within the block.
Fig. 3 is a block diagram illustrating an example of a video decoder, consistent with the techniques of this disclosure, that may implement techniques for decoding encoded last significant coefficient position information of a block of video data before decoding the encoded significant coefficient position information of the block. In the example of fig. 3, video decoder 30 includes an entropy decoding unit 70, a motion compensation unit 72, an intra-prediction module 74, an inverse quantization unit 76, an inverse transform unit 78, a memory 82, and a summer 80. Video decoder 30 may, in some examples, perform a decoding process that is substantially reciprocal to the encoding process 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.
Video decoder 30 may be configured to receive encoded video data (e.g., one or more macroblocks, or TUs of a CU) from video encoder 20. In accordance with the techniques of this disclosure, as one example, video decoder 30 may be configured to code information identifying a position of a last significant coefficient within a block of video data according to a scanning order associated with the block prior to coding information identifying positions of other significant coefficients within the block, wherein to code information identifying a position of a last significant coefficient within the block according to the scanning order, video decoder 30 may be configured to perform at least one of: coding a one-dimensional position within a block that identifies a position of a last significant coefficient within the block according to a scan order; coding a two-dimensional position within a block that identifies a position of a last significant coefficient within the block according to a scan order; and coding a flag indicating whether a last significant coefficient within a block according to the scanning order is located within a range of positions within the block, and coding a one-dimensional position within the block when a last significant coefficient within the block according to the scanning order is located within the range, and otherwise coding a two-dimensional position within the block.
As one example, to code a one-dimensional position within a block, entropy decoding unit 70 may be configured to decode a consecutive sequence of last significant coefficient flags for one or more coefficients associated with the block, starting with the first coefficient within the block according to the scanning order and ending with the last significant coefficient within the block according to the scanning order, and proceeding according to the scanning order, wherein each of the last significant coefficient flags indicates whether the respective coefficient is the last significant coefficient within the block according to the scanning order. Entropy decoding unit 70 may be further configured to, for each coefficient associated with the block, determine whether the coefficient is the last significant coefficient within the block according to the scan order based on the sequence.
As another example, to code a two-dimensional position within a block, entropy decoding unit 70 may be configured to decode a horizontal coordinate of a position of a last significant coefficient within the block according to the scanning order, and decode a vertical coordinate of the position of the last significant coefficient within the block according to the scanning order. Entropy decoding unit 70 may be further configured to, for each coefficient associated with the block, determine whether the coefficient is the last significant coefficient within the block according to the scan order based on the horizontal and vertical coordinates. In this example, the block may be a first block, the scanning order may be a first scanning order, and entropy decoding unit 70 may be further configured to arrange coefficients associated with the first block into a consecutive sequence based on the first scanning order, and map the sequence into a second block using a second scanning order to generate the second block, wherein the second block is different from the first block, and the second scanning order is different from the first scanning order. Entropy decoding unit 70 may still be further configured to, for each coefficient associated with the second block, determine, based on the determination of the first block, whether the coefficient is the last significant coefficient within the second block according to the second scan order.
Also in this example, as previously described, each of the horizontal and vertical coordinates may comprise a binarized coordinate such that the coordinate comprises a sequence of one or more bins, and wherein to decode each of the horizontal and vertical coordinates, entropy decoding unit 70 may be configured to decode the respective sequence. For example, the sequence of one or more binary values may comprise one of a unary codeword, a truncated unary codeword, an exponential golomb codeword, and a collocated codeword.
As an example, the truncated unary codeword may include: in the case where the respective coordinate has a value less than a predetermined truncated value, is a unary codeword comprising a variable number of first symbols (e.g., "1") followed by a second symbol (e.g., "0"), the variable number corresponding to the value of the coordinate, where the first symbol is different from the second symbol; and a predetermined number of first symbols, the predetermined number corresponding to a truncated value, if the coordinate has a value greater than or equal to the truncated value.
As another example, the concatenated codeword may comprise a concatenation of a first codeword (e.g., a codeword generated using a first coding method) and a second codeword (e.g., a codeword generated using a second coding method), wherein the first codeword is different from the second codeword. In this example, the concatenated codeword may be used if the block of video data is large enough such that using the unary codeword or the truncated unary codeword to represent the respective coordinate may require more bits than using the concatenated codeword.
As also described previously, to decode the horizontal and vertical coordinates, entropy decoding unit 70 may be configured to decode at least one bin of the sequence corresponding to one of the coordinates based at least in part on a value of the at least one bin of the sequence corresponding to the other coordinate. As one example, to decode at least one bin of a sequence corresponding to one of the coordinates based at least in part on a value of the at least one bin of the sequence corresponding to the other coordinate, entropy decoding unit 70 may be configured to perform a context adaptive entropy coding process that includes applying a context model based on at least one context, wherein the at least one context includes a value of the at least one bin of the sequence corresponding to the one of the coordinates.
In addition, entropy decoding unit 70 may be configured to decode one or more bins of a sequence corresponding to one coordinate and one or more bins of a sequence corresponding to another coordinate in an interleaved manner. For example, at least one bin of each of one or more bins of a sequence corresponding to one coordinate and one or more bins of a sequence corresponding to another coordinate may comprise a bin encoded using a conventional coding mode, and at least one bin of each of the sequences may comprise a bin coded using a bypass coding mode.
In this example, to decode one or more bins of a sequence corresponding to one coordinate and one or more bins of a sequence corresponding to another coordinate in an interleaved manner, entropy decoding unit 70 may be configured to decode at least one bin of the one or more bins of the sequence corresponding to the one coordinate coded using a conventional coding mode prior to decoding at least one bin of the one or more bins of the sequence corresponding to the other coordinate coded using a conventional coding mode, at least one bin of the one or more bins of the sequence corresponding to the one coordinate coded using the bypass coding mode is then decoded before at least one bin of the one or more bins of the sequence corresponding to the other coordinate coded using the bypass coding mode is decoded. In other examples, entropy decoding unit 70 may be configured to decode the bins of a sequence coded using the bypass coding mode together.
As another example, to code significant coefficient position information, where a scanning order may be a first scanning order, entropy decoding unit 70 may be configured to decode a consecutive sequence of significant coefficient flags for one or more coefficients associated with the block starting with a last significant coefficient within the block according to the scanning order and ending with a first coefficient within the block according to the scanning order, and proceeding according to a second scanning order that is reversed relative to the first scanning order, wherein each of the significant coefficient flags indicates whether the respective coefficient is a significant coefficient. Entropy decoding unit 70 may be further configured to, for each coefficient associated with the block, determine whether the coefficient is a significant coefficient based on the sequence.
As another example, to code significant coefficient position information, entropy decoding unit 70 may be configured to decode a consecutive sequence of flags for one or more coefficients associated with the block arranged into one or more groups, wherein each of the one or more groups comprises one or more of the coefficients, starting with a first coefficient within the block according to the scanning order and ending with a last significant coefficient within the block according to the scanning order, and continuing according to the scanning order. In this example, for each of one or more groups, the sequence may include one or more flags including a group flag indicating whether one or more of the coefficients are all zero-valued (i.e., non-significant) coefficients, and a significant coefficient flag for each of one or more of the coefficients when at least one of the one or more of the coefficients is a significant coefficient, indicating whether the respective coefficient is a significant coefficient. Entropy decoding unit 70 may be further configured to, for each coefficient associated with the block, determine whether the coefficient is a significant coefficient based on the sequence.
In yet another example, to code last significant coefficient position information, and to code significant coefficient position information, entropy decoding unit 70 may be configured to perform a context adaptive entropy coding process (e.g., a CABAC process) that includes entropy decoding unit 70 applying a context model based on at least one context, wherein the at least one context includes one of last significant coefficient position information and significant coefficient position information. As one example, to decode a sequence of one or more bins corresponding to each of a horizontal coordinate and a vertical coordinate, entropy decoding unit 70 may be configured to decode each bin in the sequence by performing a context adaptive entropy coding process that includes applying a context model based on at least one context, wherein the at least one context includes a position of the respective bin within the sequence. As previously described, the position of a binary value within a sequence may correspond to a row number or a column number within a block that corresponds to the position of the binary value. In other words, the context used to code a bin may be the position within the block in the x or y direction that corresponds to the bin. In this example, entropy decoding unit 70 configured as described may enable entropy decoding unit 70 to code information more efficiently using a smaller number of bits than when using other methods, for example.
As such, the techniques of this disclosure may enable entropy decoding unit 70 to have lower complexity relative to other systems and may enable entropy decoding unit 70 to code last significant coefficient position information and significant coefficient position information more efficiently than when using other methods. In this way, when using the techniques of this disclosure, there may be a relative bit savings for coded bitstreams that include information, and the complexity of entropy decoding unit 70 used to code the information may be relatively reduced.
Motion compensation unit 72 may use the motion vectors received in the bitstream to identify the prediction block in the reference frame in memory 82. Intra-prediction module 74 may use intra-prediction modes received in the bitstream to form prediction blocks from spatially neighboring blocks.
Intra-prediction module 74 may intra-predict the encoded block using an indication of an intra-prediction mode for the encoded block, e.g., using pixels of neighboring previously decoded blocks. For examples in which a block is inter-prediction mode encoded, motion compensation unit 72 may receive information defining a motion vector in order to retrieve motion compensated prediction data for the encoded block. In any case, motion compensation unit 72 or intra-prediction module 74 may provide information defining the prediction block to summer 80.
Inverse quantization unit 76 inverse quantizes (i.e., de-quantizes) the quantized block coefficients provided in the bitstream and decoded by entropy decoding unit 70. The inverse quantization process may include, for example, conventional processes as defined by the h.264 decoding standard or as performed by the HEVC test model. The inverse quantization process may also include the use of a quantization parameter QPY calculated by video encoder 20 for each block to determine the degree of quantization, and likewise the degree of inverse quantization that should be applied.
The inverse transform module 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. Motion compensation unit 72 generates motion compensated blocks, possibly performing interpolation filter-based interpolation. An identifier of an interpolation filter to be used for motion estimation with sub-pixel precision may be included in the syntax element. Motion compensation unit 72 may calculate interpolated values for sub-integer pixels of the reference block using interpolation filters as used by video encoder 20 during encoding of the video block. Motion compensation unit 72 may determine the interpolation filters used by video encoder 20 according to the received syntax information and use the interpolation filters to generate prediction blocks.
Motion compensation unit 72 uses some of the syntax information for the encoded blocks to determine the size of the blocks used to encode the frames of the encoded video sequence, partitioning information that describes how to partition each block of a frame or slice of the encoded video sequence, a mode that indicates how to encode each partition, one or more reference frames (and reference frame lists) for each inter-coded block or partition, and other information used to decode the encoded video sequence. Intra-prediction module 74 may also intra-predict the encoded block using syntax information for the encoded block, e.g., using pixels of neighboring previously decoded blocks, as described above.
Summer 80 sums the residual block with the corresponding prediction block generated by motion compensation unit 72 or intra-prediction module 74 to form a decoded block. Deblocking filters may also be applied to filter the decoded blocks, if desired, in order to remove blockiness artifacts. The decoded video blocks are then stored in memory 82, memory 82 providing reference blocks for subsequent motion compensation and also generating decoded video for presentation on a display device (e.g., display device 32 of fig. 1).
In this manner, video decoder 30 represents an example of a video coder configured to code information identifying a position of a last significant coefficient within a block of video data according to a scanning order associated with the block prior to coding information identifying positions of other significant coefficients within the block, wherein to code the information identifying a position of a last significant coefficient within the block according to the scanning order, the video coder is configured to perform at least one of: coding a one-dimensional position within a block that identifies a position of a last significant coefficient within the block according to a scan order; coding a two-dimensional position within a block that identifies a position of a last significant coefficient within the block according to a scan order; and coding a flag indicating whether a last significant coefficient within a block according to the scanning order is located within a range of positions within the block, and coding a one-dimensional position within the block when a last significant coefficient within the block according to the scanning order is located within the range, and otherwise coding a two-dimensional position within the block.
Fig. 4A-4C are conceptual diagrams illustrating examples of blocks of video data and corresponding significant-coefficient position information and last significant-coefficient position information. As shown in fig. 4A, a block of video data (e.g., a macroblock, or a TU of a CU) may include quantized transform coefficients. For example, as shown in fig. 4A, block 400 may include quantized transform coefficients generated using the prediction, transform, and quantization techniques previously described. For this example, assume that block 400 has a size of 2N, where N is equal to two. Thus, block 400 has a size of 4 × 4 and includes sixteen quantized transform coefficients, as also shown in fig. 4A. Assume further that the scanning order associated with block 400 is a zig-zag scanning order, as shown in FIG. 5A described in more detail below.
In this example, the last significant coefficient within block 400 according to the zig-zag scanning order is a quantized transform coefficient equal to "1," which is located at position 406 within block 400. In other examples, as described above, the block may have a size that is smaller or larger than the size of block 400, and may include more or less quantized transform coefficients than block 400. In still other examples, the scanning order associated with block 400 may be a different scanning order, such as a horizontal scanning order, a vertical scanning order, a diagonal scanning order, or another scanning order.
Fig. 4B illustrates an example of significant-coefficient flag data (i.e., significant-coefficient flags represented in a graph or block form as previously described). In the example of fig. 4B, block 402 may correspond to block 400 depicted in fig. 4A. In other words, the significant coefficient flag of block 402 may correspond to the quantized transform coefficient of block 400. As shown in fig. 4B, the significant coefficient flag of block 402 equal to "1" corresponds to the significant coefficient of block 400. Similarly, the significant coefficient flag of block 402 equal to "0" corresponds to zero, or a non-significant coefficient, of block 400.
In this example, the significant-coefficient flag within block 402 corresponding to the last significant coefficient within block 400 according to the zig-zag scanning order is a significant-coefficient flag equal to "1," which is located at position 408 within block 402. In other examples, the values of the significant coefficient flags used to indicate significant or non-significant coefficients may vary (e.g., a significant coefficient flag equal to "0" may correspond to a significant coefficient, and a significant coefficient flag equal to "1" may correspond to a non-significant coefficient).
Fig. 4C illustrates an example of last significant coefficient flag data (i.e., a last significant coefficient flag also represented in a graph or block form as previously described). In the example of fig. 4C, block 404 may correspond to block 400 and block 402 depicted in fig. 4A and 4B, respectively. In other words, the last significant coefficient flag of block 404 may correspond to the quantized transform coefficient of block 400 and to the significant coefficient flag of block 402.
As shown in fig. 4C, the last significant coefficient flag of block 404 equal to "1" at position 410 of block 404 corresponds to the last significant coefficient of block 400 according to the zig-zag scan order, and corresponds to the last of the significant coefficient flags of block 402 equal to "1". Similarly, the last significant coefficient flag of block 404 equal to "0" (i.e., all remaining last significant coefficient flags) corresponds to the zero or non-significant coefficients of block 400 according to the zig-zag scan order, and corresponds to all significant coefficient flags of block 402 equal to "1" except the last of these significant coefficient flags.
The value of the last significant coefficient flag to indicate the last significant coefficient according to the scan order may vary (e.g., the last significant coefficient flag equal to "0" may correspond to the last significant coefficient according to the scan order, and the last significant coefficient flag equal to "1" may correspond to all remaining coefficients). In any case, the significant-coefficient flags of block 402, and the last significant-coefficient flag of block 404 may be collectively referred to as the SM data of block 400.
As described above, significant coefficient position information for a block of video data may be indicated by serializing significant coefficient flags for the block from a two-dimensional block representation (as depicted in block 402 shown in fig. 4B) into a one-dimensional array using the scan order associated with the block. In the example of blocks 400-402 shown in fig. 4A-4B, again assuming a zig-zag scanning order, the significant-coefficient position information for block 400 may be indicated by serializing the significant-coefficient flags of block 402 into a one-dimensional array. That is, the significant-coefficient position information of block 400 may be indicated by generating a sequence of significant-coefficient flags of block 402 according to a zig-zag scanning order.
In this example, the generated sequence may correspond to the value "111111," which represents the first 6 significant coefficient flags of block 402 according to the zig-zag scan order. It should be noted that the generated sequence may contain significant coefficient flags corresponding to a range of block positions within block 400, starting from the first block position (i.e., the DC position) in the zig-zag scanning order and ending with a block position corresponding to the last significant coefficient of block 400 according to the zig-zag scanning order (i.e., the last significant coefficient flag equal to "1" corresponding to block 404).
As also described above, in accordance with the techniques of this disclosure, the last significant coefficient position information of a block may be indicated using a one-dimensional position, indicating the last significant coefficient position within the block, e.g., by serializing the last significant coefficient flag of the block from a two-dimensional block representation (as depicted in block 404 shown in fig. 4C) into a one-dimensional array using the scan order associated with the block. In the example of blocks 400-404 shown in fig. 4A-4C, again assuming a zig-zag scan order, the last significant coefficient position information of block 400 may be indicated by serializing the last significant coefficient flag of block 404 into a one-dimensional array. That is, the last significant coefficient position information of block 400 may be indicated by generating a sequence of last significant coefficient flags of block 404 according to a zig-zag scan order. In this example, the generated sequence may correspond to the value "000001," which represents the first 6 last significant coefficient flags of block 404 according to the zig-zag scan order.
Again, it should be noted that the generated sequence may contain a last significant coefficient flag corresponding to a range of block positions within block 400, starting from the first block position in the zig-zag scan order and ending with a block position corresponding to the last significant coefficient of block 400 according to the zig-zag scan order (i.e., a last significant coefficient flag equal to "1" corresponding to block 404). Thus, in this example, the last significant coefficient flag equal to "1" is not included in the sequence after the last significant coefficient flag according to the zig-zag scan order. In general, it may not be necessary to indicate the last significant coefficient position information of a block of video data after the last significant coefficient flag equal to "1" according to the scanning order associated with the block. Thus, in some examples, these flags are omitted from the generated sequence of last significant coefficient flags used to indicate information.
It should also be noted that, as described above, if the last significant coefficient is located at the last block position according to the scan order (e.g., the bottom-right block position), the generated sequence may not include the last significant coefficient flag corresponding to the last block position, as it can be inferred that position contains the last significant coefficient of the block. Thus, in this example, the generated sequence may correspond to the value "000000000000000," where the last significant coefficient flag corresponding to the last block position is not included in the sequence, and is inferred to be equal to "1.
As also described above, in accordance with the techniques of this disclosure, the last significant coefficient position information of a block may be indicated using a two-dimensional position (e.g., using horizontal and vertical coordinates), thereby indicating the last significant coefficient position within the block. For example, referring again to fig. 4A-4C, a horizontal coordinate equal to "2" and a vertical coordinate equal to "0" may be used to indicate the last significant-coefficient location information of block 400. The coordinates may correspond to a location 406 within the block 400, where the reference or original location is a DC location, which corresponds to horizontal and vertical coordinates both equal to "0". As previously described, coordinates may be represented using unary codewords. In this example, the horizontal coordinate may correspond to a unary codeword of "110" and the vertical coordinate may correspond to a unary codeword of "0".
In any case, as previously described, the last significant coefficient position information of a block represented as a sequence of last significant coefficient flags or horizontal and vertical coordinates (which in turn are represented as a unary codeword) may be coded before coding the significant coefficient position information of the block represented as a sequence of significant coefficient flags, which may enable coding of information in parallel, and may result in low coding system complexity. As also previously described, last significant coefficient position information and significant coefficient position information may each be coded using a context adaptive entropy coding process (e.g., a CABAC process) that includes applying a context model based on at least one context, where the at least one context may include one of the last significant coefficient position information and the significant coefficient position information, which may enable efficient coding, e.g., coding information using a smaller number of bits.
In this way, video encoder 20 of fig. 2 and/or video decoder 30 of fig. 3 may be configured to code information identifying a position of a last significant coefficient within a block of video data according to a scanning order associated with the block prior to coding information identifying positions of other significant coefficients within the block, wherein to code the information identifying a position of a last significant coefficient within the block according to the scanning order, the video coder is configured to perform at least one of: coding a one-dimensional position within a block that identifies a position of a last significant coefficient within the block according to a scan order; coding a two-dimensional position within a block that identifies a position of a last significant coefficient within the block according to a scan order; and coding a flag indicating whether a last significant coefficient within a block according to the scanning order is located within a range of positions within the block, and coding a one-dimensional position within the block when a last significant coefficient within the block according to the scanning order is located within the range, and otherwise coding a two-dimensional position within the block.
Fig. 5A-5C are conceptual diagrams illustrating examples of blocks of video data scanned using a zig-zag scanning order, a horizontal scanning order, and a vertical scanning order, respectively. As shown in fig. 5A-5C, an 8 x 8 block of video data (e.g., a macroblock, or a TU of a CU) may include sixty-four quantized transform coefficients in corresponding block positions represented by circles. For example, again, blocks 500-504 may each include sixty-four quantized transform coefficients generated using the prediction, transform, and quantization techniques previously described, with each corresponding block position represented by a circle. For this example, assume that blocks 500-504 have a size of 2N, where N is equal to four. Thus, the blocks 500 to 504 have a size of 8 × 8.
As shown in fig. 5A, the scanning order associated with block 500 is a zig-zag scanning order. The zig-zag scan order scans the quantized transform coefficients of block 500 in a diagonal manner as indicated by the arrows in fig. 5A. Similarly, as shown in fig. 5B and 5C, the scan orders associated with blocks 502 and 504 are a horizontal scan order and a vertical scan order, respectively. The horizontal scanning order scans the quantized transform coefficients of block 502 in a horizontal line-by-line or "raster" manner, while the vertical scanning order scans the quantized transform coefficients of block 504 in a vertical line-by-line or "rotated raster" manner, as also indicated by the arrows in fig. 5B and 5C.
In other examples, as described above, the blocks may have sizes smaller or larger than the sizes of blocks 500-504, and may include more or less quantized transform coefficients and corresponding block positions. In these examples, the scan order associated with the block may scan the quantized transform coefficients of the block in a substantially similar manner as shown in the examples of 8 x 8 blocks 500-504 of fig. 5A-5C, e.g., a 4 x 4 block or a 16 x 16 block may be scanned in any of the previously described scan orders.
As previously described, the techniques of this disclosure may also be used with respect to a wide variety of other scanning orders, including diagonal scanning orders, scanning orders that are combinations of zig-zag, horizontal, vertical, and/or diagonal scanning orders, and partially zig-zag, partially horizontal, partially vertical, and/or partially diagonal scanning orders. In addition, the techniques of this disclosure may also consider scanning orders that are themselves adaptive based on statistics associated with previously coded blocks of video data (e.g., blocks having the same block size or coding mode as the current block being coded). For example, in some cases, the adaptive scan order may be a scan order associated with a block of video data.
In this way, video encoder 20 of fig. 2 and/or video decoder 30 of fig. 3 may be configured to code information identifying a position of a last significant coefficient within a block of video data according to a scanning order associated with the block (e.g., the zig-zag, horizontal, or vertical scanning orders shown in fig. 5A-5C, respectively) prior to coding the information identifying positions of other significant coefficients within the block, wherein to code the information identifying a position of a last significant coefficient within the block according to the scanning order, video encoder 20 and/or video decoder 30 may be configured to perform at least one of: coding a one-dimensional position within a block that identifies a position of a last significant coefficient within the block according to a scan order; coding a two-dimensional position within a block that identifies a position of a last significant coefficient within the block according to a scan order; and coding a flag indicating whether a last significant coefficient within a block according to the scanning order is located within a range of positions within the block, and coding a one-dimensional position within the block when a last significant coefficient within the block according to the scanning order is located within the range, and otherwise coding a two-dimensional position within the block.
Fig. 6A-6B are conceptual diagrams illustrating examples of last significant coefficient position information for a block of video data. In a similar manner as described above with reference to fig. 4A, as shown in fig. 6A, block 600 may include quantized transform coefficients. In this example, again according to the zig-zag scan order, the last significant coefficient of block 600 is a quantized transform coefficient equal to "1," which is located at position 604 within block 600. As previously described, in accordance with the techniques of this disclosure, the last significant-coefficient location information of block 600 may be indicated using a two-dimensional location that includes horizontal and vertical coordinates. In this example, the last significant-coefficient position information of block 600 may be indicated using a horizontal coordinate equal to "2" and a vertical coordinate equal to "0". In this example, the horizontal coordinate may correspond to a unary codeword of "110" and the vertical coordinate may correspond to a unary codeword of "0".
Fig. 6B illustrates an example of a block of quantized transform coefficients produced by arranging the coefficients of block 600 of fig. 6A into a continuous sequence based on a scanning order associated with block 600 (e.g., a zig-zag scanning order), and mapping the sequence into block 602 using a horizontal scanning order. In this example, this time according to the horizontal scanning order, the last significant coefficient of block 602 is the quantized transform coefficient equal to "1," which is located at position 606 within block 602. As previously described, in accordance with the techniques of this disclosure, the last significant-coefficient location information of block 602 may be indicated using a two-dimensional location that includes horizontal and vertical coordinates. In this example, the last significant-coefficient position information of block 602 may be indicated using a horizontal coordinate equal to "1" and a vertical coordinate equal to "1" (which may each correspond to a unary codeword of "10").
As previously described, since the coefficients of block 600 are mapped into block 602 in the manner described above, different values for one coordinate of the last significant coefficient position information of block 602 may result in different probability estimates for the binary value of a unary codeword for another coordinate. In addition, as also previously described, different positions of the binary value of a unary codeword of another coordinate within the codeword may result in different probability estimates of the binary value of the codeword. That is, different row numbers or column numbers within the block 602 that correspond to the position of a binary value may result in different probability estimates for the binary value. Thus, when one coordinate of the last significant-coefficient position information is coded before another coordinate is coded, each bin of a unary codeword for the other coordinate may be coded by performing a context adaptive entropy coding process (e.g., a CABAC process) that includes applying a context model based on at least one context, where the at least one context may include a position of the bin within the unary codeword and a value of the one coordinate previously coded, as previously described. In other examples, sequences may be mapped into blocks 602 using different scanning orders (e.g., vertical scanning orders), which may result in different horizontal and vertical coordinates, and different probability estimates of the binary values of unary codewords for the horizontal and vertical coordinates.
In this way, video encoder 20 of fig. 2 and/or video decoder 30 of fig. 3 may be configured to code information identifying the position of the last significant coefficient within a block of video data according to a scanning order associated with the block prior to coding information identifying the positions of other significant coefficients within the block, wherein to code the information identifying the position of the last significant coefficient within the block according to the scanning order, video encoder 20 and/or video decoder 30 may be configured to perform at least one of: coding a one-dimensional position within a block that identifies a position of a last significant coefficient within the block according to a scan order; coding a two-dimensional position within a block that identifies a position of a last significant coefficient within the block according to a scan order; and coding a flag indicating whether a last significant coefficient within a block according to the scanning order is located within a range of positions within the block, and coding a one-dimensional position within the block when a last significant coefficient within the block according to the scanning order is located within the range, and otherwise coding a two-dimensional position within the block.
Fig. 7 is a flow diagram illustrating an example of a method for coding last significant coefficient position information for a block of video data before coding the significant coefficient position information for the block. The techniques of fig. 7 may be performed by generally any processing unit or processor, whether implemented in hardware, software, firmware, or a combination thereof, and when implemented in software or firmware, the corresponding hardware may be provided to execute the instructions of the software or firmware. For example, the techniques of fig. 7 are described with respect to video encoder 20 (fig. 1 and 2) and/or video decoder 30 (fig. 1 and 3), although it should be understood that other devices may also be configured to perform similar techniques. Moreover, the steps illustrated in fig. 7 may be performed in a different order or in parallel, and additional steps may be added as well as certain steps omitted, without departing from the techniques of this disclosure.
Initially, video encoder 20 and/or video decoder 30 may determine a context for coding information identifying a position of a last significant coefficient within a block of video data according to a scanning order associated with the block (700). For example, the block may be a macroblock, or a TU of a CU. Moreover, as previously described, the scanning order associated with the blocks may be a zig-zag scanning order, a horizontal scanning order, a vertical scanning order, or another scanning order. As also previously described, the last significant coefficient position information may be represented as a sequence of last significant coefficient flags, or as horizontal and vertical coordinates of the last significant coefficient position within the block. As also described previously, the context used to code the last significant coefficient position information may be the information itself.
Video encoder 20 and/or video decoder 30 may further code the last significant coefficient position information (702). For example, as described above, the information may be encoded in the case of video encoder 20, or decoded in the case of video decoder 30 by performing a context adaptive entropy coding process (e.g., a CABAC process) that includes applying a context model based on the determined context. In examples where the information is represented as a sequence of last significant coefficient flags, the context model may contain some probability estimates that indicate the likelihood that the last significant coefficient flag being coded corresponds to the last significant coefficient of the block according to the scan order (e.g., the last significant coefficient flag is equal to "0" or "1"). In examples where information is represented using horizontal and vertical coordinates of the last significant-coefficient position within a block, where each coordinate is further represented as a unary codeword, the context model may contain some probability estimates that indicate the likelihood that the binary value of the unary codeword for a given coordinate being coded is equal to a particular value (e.g., "0" or "1"). In any case, using these probability estimates, video encoder 20 and/or video decoder 30 may code the last significant coefficient position information by performing a context adaptive entropy coding process.
Video encoder 20 and/or video decoder 30 may further determine contexts for coding information that identifies the positions of other significant coefficients within the block (704). As described previously, the significant coefficient position information may be represented as a sequence of significant coefficient flags. As also described previously, the context may include last significant coefficient position information as well as significant coefficient position information.
Video encoder 20 and/or video decoder 30 may further code significant coefficient position information (706). Again, as described above, the information may be encoded in the case of video encoder 20, or decoded in the case of video decoder 30 by performing a context adaptive entropy coding process (e.g., a CABAC process) that includes applying a context model based on the determined context. In this example, the context model may contain some probability estimates that indicate the likelihood that the significant coefficient flag being coded corresponds to a significant coefficient of the block (e.g., the significant coefficient flag is equal to "0" or "1"). Again, using these probability estimates, video encoder 20 and/or video decoder 30 may code significant coefficient position information by performing a context adaptive entropy coding process.
In this manner, the method of fig. 7 represents an example of a method of coding information identifying a position of a last significant coefficient within a block of video data according to a scanning order associated with the block prior to coding information identifying positions of other significant coefficients within the block, wherein coding information identifying a position of a last significant coefficient within the block according to the scanning order includes at least one of: coding a one-dimensional position within a block that identifies a position of a last significant coefficient within the block according to a scan order; coding a two-dimensional position within a block that identifies a position of a last significant coefficient within the block according to a scan order; and coding a flag indicating whether a last significant coefficient within a block according to the scanning order is located within a range of positions within the block, and coding a one-dimensional position within the block when a last significant coefficient within the block according to the scanning order is located within the range, and otherwise coding a two-dimensional position within the block.
Fig. 8 is a flow diagram illustrating an example of a method for encoding last significant coefficient position information for a block of video data before encoding the significant coefficient position information for the block. Again, the techniques of fig. 8 may be generally performed by any processing unit or processor, whether implemented in hardware, software, firmware, or a combination thereof, and when implemented in software or firmware, the corresponding hardware may be provided to execute the instructions of the software or firmware. For example, the technique of fig. 8 is described with respect to entropy encoding unit 56 (fig. 2), although it should be understood that other devices may also be configured to perform similar techniques. Moreover, the steps illustrated in fig. 8 may be performed in a different order or in parallel, and additional steps may be added as well as certain steps omitted, without departing from the techniques of this disclosure.
Initially, entropy encoding unit 56 may receive a block of video data (800). For example, the block may be a macroblock, or a TU of a CU. Entropy encoding unit 56 may further determine information identifying the position of the last significant coefficient within the block according to the scanning order associated with the block (802), i.e., the last significant coefficient position information for the block. As described above, the information may include a sequence of last significant coefficient flags, or the horizontal and vertical coordinates of the last significant coefficient position within the block. Entropy encoding unit 56 may further determine a context for encoding the last significant coefficient position (804). For example, the coding context may include the last significant coefficient position information itself. Entropy encoding unit 56 may further encode last significant coefficient position information (806). For example, the information may be encoded by performing a context adaptive entropy coding process (e.g., a CABAC process) that includes applying a context model based on the determined context. Finally, entropy encoding unit 56 may output the encoded information to a bitstream (808).
Entropy encoding unit 56 may further determine information identifying the position of other significant coefficients within the block (810), i.e., significant coefficient position information for the block. As described above, the significant coefficient position information may include a sequence of significant coefficient flags. Entropy encoding unit 56 may further determine a context for encoding significant-coefficient position information (812). For example, the coding context may include the last significant coefficient position, as well as the significant coefficient position information itself. Entropy encoding unit 56 may further encode significant coefficient position information (814). For example, the information may be encoded by performing a context adaptive entropy coding process (e.g., a CABAC process) that includes applying a context model based on the determined context. Finally, entropy encoding unit 56 may output the encoded information to a bitstream (816).
In this manner, the method of fig. 8 represents an example of a method of coding information identifying a position of a last significant coefficient within a block of video data according to a scanning order associated with the block prior to coding information identifying positions of other significant coefficients within the block, wherein coding information identifying a position of a last significant coefficient within the block according to the scanning order includes at least one of: coding a one-dimensional position within a block that identifies a position of a last significant coefficient within the block according to a scan order; coding a two-dimensional position within a block that identifies a position of a last significant coefficient within the block according to a scan order; and coding a flag indicating whether a last significant coefficient within a block according to the scanning order is located within a range of positions within the block, and coding a one-dimensional position within the block when a last significant coefficient within the block according to the scanning order is located within the range, and otherwise coding a two-dimensional position within the block.
Fig. 9 is a flow diagram illustrating an example of a method for decoding encoded last significant coefficient position information for a block of video data prior to decoding the encoded significant coefficient position information for the block. Again, the techniques of fig. 9 may be generally performed by any processing unit or processor, whether implemented in hardware, software, firmware, or a combination thereof, and when implemented in software or firmware, the corresponding hardware may be provided to execute the instructions of the software or firmware. For example, the technique of fig. 9 is described with respect to entropy decoding unit 70 (fig. 3), although it should be understood that other devices may also be configured to perform similar techniques. Moreover, the steps illustrated in fig. 9 may be performed in a different order or in parallel, and additional steps may be added as well as certain steps omitted, without departing from the techniques of this disclosure.
Initially, entropy decoding unit 70 may receive encoded information that identifies a position of a last significant coefficient within a block of video data according to a scanning order associated with the block (900), i.e., last significant coefficient position information for the block. Again, the block may be a macroblock, or a TU of a CU. Entropy decoding unit 70 may further determine a context for decoding the encoded last significant coefficient position information (902). For example, the decoding context may include the last significant coefficient position information itself. Entropy decoding unit 70 may further decode the last significant coefficient position information (904). For example, the information may be decoded by performing a context adaptive entropy coding process (e.g., a CABAC process) that includes applying a context model based on the determined context. As described above, the decoded information may comprise a sequence of last significant coefficient flags, or the horizontal and vertical coordinates of the last significant coefficient position within the block.
Subsequently, entropy decoding unit 70 may receive encoded information that identifies the positions of other significant coefficients within the block (906), i.e., significant coefficient position information for the block. Entropy decoding unit 70 may further determine a context for decoding the encoded significant-coefficient position information (908). For example, the decoding context may include the last significant coefficient position information, as well as the significant coefficient position information itself. Entropy decoding unit 70 may further decode the encoded significant coefficient position information (910). For example, the information may be decoded by performing a context adaptive entropy coding process (e.g., a CABAC process) that includes applying a context model based on the determined context. As described above, the decoded information may comprise a sequence of significant coefficient flags. Finally, entropy decoding unit 70 may decode the block based on the decoded last significant coefficient position information and the decoded significant coefficient information (912).
In this manner, the method of fig. 9 represents an example of a method of coding information identifying a position of a last significant coefficient within a block of video data according to a scanning order associated with the block prior to coding information identifying positions of other significant coefficients within the block, wherein coding information identifying a position of a last significant coefficient within the block according to the scanning order includes at least one of: coding a one-dimensional position within a block that identifies a position of a last significant coefficient within the block according to a scan order; coding a two-dimensional position within a block that identifies a position of a last significant coefficient within the block according to a scan order; and coding a flag indicating whether a last significant coefficient within a block according to the scanning order is located within a range of positions within the block, and coding a one-dimensional position within the block when a last significant coefficient within the block according to the scanning order is located within the range, and otherwise coding a two-dimensional position within the block.
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. The computer-readable medium may include: computer-readable storage media corresponding 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 non-transitory, tangible computer-readable storage medium 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 implementing 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 program 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 are instead directed 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, an Application Specific Integrated Circuits (ASICs), field programmable logic arrays (FPGAs), or other equivalent integrated or discrete logic circuitry. Thus, 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. Additionally, in some aspects, the functionality described herein may be provided in 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 a wide variety of devices or apparatuses, 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, and do not necessarily require to be embodied by different hardware units. Rather, as noted above, the various units may be combined in a codec hardware unit or provided by a collection of interoperating hardware units (including one or more processors as noted above) together with suitable software and/or firmware.
Various examples have been described. These and other examples are within the scope of the following claims.
Claims (91)
1. A method of coding coefficients associated with a block of video data during a video coding process, the method comprising:
coding information identifying a position of a last non-zero coefficient within the block according to a scanning order associated with the block prior to coding information identifying positions of other non-zero coefficients within the block, wherein coding the information identifying the position of the last non-zero coefficient within the block according to the scanning order includes at least one of:
coding a one-dimensional position within the block that identifies the position of the last non-zero coefficient within the block according to the scanning order;
coding a two-dimensional position within the block that identifies the position of the last non-zero coefficient within the block according to the scanning order; and
coding a flag indicating whether the last non-zero coefficient within the block according to the scanning order is located within a range of positions within the block, and coding the one-dimensional position within the block when the last non-zero coefficient within the block according to the scanning order is located within the range, and otherwise coding the two-dimensional position within the block.
2. The method of claim 1, wherein coding comprises encoding, and wherein encoding the one-dimensional position within the block that identifies the position of the last non-zero coefficient within the block according to the scanning order comprises:
for each of one or more coefficients associated with the block, starting with a first coefficient within the block according to the scan order and ending with the last non-zero coefficient within the block according to the scan order, and continuing according to the scan order, determining whether the coefficient is the last non-zero coefficient within the block according to the scan order, and generating a last significant coefficient flag indicating whether the coefficient is the last non-zero coefficient within the block according to the scan order;
arranging the last significant coefficient flags for the one or more coefficients into a consecutive sequence based on the scan order; and
the sequence is encoded.
3. The method of claim 1, wherein coding comprises encoding, and wherein encoding the two-dimensional position within the block that identifies the position of the last non-zero coefficient within the block according to the scanning order comprises:
determining a horizontal coordinate of the position of the last non-zero coefficient within the block according to the scan order;
determining a vertical coordinate of the position of the last non-zero coefficient within the block according to the scan order; and
encoding the horizontal coordinate and the vertical coordinate.
4. The method of claim 3, wherein the block comprises a first block and the scanning order comprises a first scanning order, the method further comprising:
arranging coefficients associated with a second block into a consecutive sequence based on a second scanning order, wherein the second block is different from the first block and the second scanning order is different from the first scanning order; and
mapping the sequence into the first block using the first scan order to generate the first block.
5. The method of claim 3, wherein encoding each of the horizontal and vertical coordinates comprises binarizing the respective coordinate such that the coordinate comprises a sequence of one or more bins, and encoding the sequence.
6. The method of claim 5, wherein the sequence of one or more binary values comprises one of a unary codeword, a truncated unary codeword, an exponential golomb codeword, and a collocated codeword.
7. The method of claim 6, wherein the truncated unary codeword comprises:
a unary codeword comprising a variable number of first symbols followed by a second symbol, the variable number corresponding to the value of the coordinate, where the first symbol is different from the second symbol, if the respective coordinate has a value less than a predetermined truncated value; and is
A predetermined number of the first symbols, the predetermined number corresponding to the truncated value, in a case where the coordinate has a value greater than or equal to the truncated value.
8. The method of claim 6, wherein the concatenated codeword comprises a concatenation of a first codeword and a second codeword,
wherein the first codeword is different from the second codeword.
9. The method of claim 5, wherein encoding each bin in the sequence comprises performing a context adaptive entropy coding process that includes applying a context model based on at least one context, wherein the at least one context includes a position of a respective bin within the sequence.
10. The method of claim 5, wherein encoding the horizontal coordinate and the vertical coordinate comprises:
encoding at least one bin of the sequence corresponding to one of the coordinates based at least in part on a value of the at least one bin of the sequence corresponding to the other coordinate.
11. The method of claim 10, wherein encoding the at least one bin of the sequence corresponding to the one of the coordinates based at least in part on the value of the at least one bin of the sequence corresponding to the other coordinate comprises performing a context adaptive entropy coding process that includes applying a context model based on at least one context, wherein the at least one context includes the value of the at least one bin of the sequence corresponding to the one of the coordinates.
12. The method of claim 5, further comprising encoding the one or more bins of the sequence corresponding to the one coordinate and the one or more bins of the sequence corresponding to the other coordinate in an interleaved manner.
13. The method of claim 12, wherein at least one bin of each of the one or more bins of the sequence corresponding to the one coordinate and the one or more bins of the sequence corresponding to the other coordinate comprises a bin encoded using a conventional coding mode and at least one bin of each of the sequences comprises a bin encoded using a bypass coding mode, and wherein encoding the one or more bins of the sequence corresponding to the one coordinate and the one or more bins of the sequence corresponding to the other coordinate in the interleaved manner comprises:
encoding the at least one bin of the sequence of the one or more bins corresponding to the one coordinate encoded using the conventional coding mode prior to encoding the at least one bin of the sequence of the one or more bins corresponding to the other coordinate encoded using the conventional coding mode, followed by encoding the at least one bin of the sequence of the one or more bins corresponding to the one coordinate encoded using the bypass coding mode prior to encoding the at least one bin of the one or more bins corresponding to the other coordinate encoded using the bypass coding mode.
14. The method of claim 1, wherein the scanning order comprises a first scanning order, wherein coding comprises encoding, and wherein encoding the information that identifies the positions of the other non-zero coefficients within the block comprises:
for each of one or more coefficients associated with the block, starting with the last non-zero coefficient within the block according to the scanning order and ending with a first coefficient within the block according to the scanning order, and proceeding according to a second scanning order that is reverse relative to the first scanning order, determining whether the coefficient is a non-zero coefficient, and generating a significant coefficient flag indicating whether the coefficient is a non-zero coefficient;
arranging the significant coefficient flags for the one or more coefficients into a consecutive sequence based on the second scanning order; and
the sequence is encoded.
15. The method of claim 1, wherein coding comprises encoding, and wherein encoding the information identifying the positions of the other non-zero coefficients within the block comprises:
arranging one or more coefficients associated with the block into one or more groups, starting with a first coefficient within the block according to the scanning order and ending with the last non-zero coefficient within the block according to the scanning order, and continuing according to the scanning order, wherein each of the one or more groups comprises one or more of the coefficients;
for each of the one or more groups, determining whether the one or more of the coefficients are non-zero coefficients and generating one or more flags, wherein the one or more flags comprise a group flag indicating whether the one or more of the coefficients are all zero-valued coefficients, and when at least one of the one or more of the coefficients is a non-zero coefficient, the one or more flags further comprise a significant coefficient flag for each of the one or more of the coefficients, the significant coefficient flag indicating whether the respective coefficient is a non-zero coefficient;
arranging the one or more flags of the one or more groups into a consecutive sequence based on the scan order; and
the sequence is encoded.
16. The method of claim 1, wherein coding comprises decoding, and wherein decoding the one-dimensional position within the block that identifies the position of the last non-zero coefficient within the block according to the scanning order comprises:
decoding a consecutive sequence of last significant coefficient flags for one or more coefficients associated with the block, starting with a first coefficient within the block according to the scanning order and ending with the last non-zero coefficient within the block according to the scanning order, and continuing according to the scanning order, wherein each of the last significant coefficient flags indicates whether a respective coefficient is the last non-zero coefficient within the block according to the scanning order; and
for each coefficient associated with the block, determining whether the coefficient is the last non-zero coefficient within the block according to the scan order based on the sequence.
17. The method of claim 1, wherein coding comprises decoding, and wherein decoding the two-dimensional position within the block that identifies the position of the last non-zero coefficient within the block according to the scanning order comprises:
decoding a horizontal coordinate of the position of the last non-zero coefficient within the block according to the scan order;
decoding a vertical coordinate of the position of the last non-zero coefficient within the block according to the scan order; and
for each coefficient associated with the block, determining whether the coefficient is the last non-zero coefficient within the block according to the scan order based on the horizontal coordinate and the vertical coordinate.
18. The method of claim 17, wherein the block comprises a first block and the scanning order comprises a first scanning order, the method further comprising:
arranging coefficients associated with the first block into a consecutive sequence based on the first scanning order;
mapping the sequence into a second block using a second scanning order to generate the second block, wherein the second block is different from the first block and the second scanning order is different from the first scanning order; and
for each coefficient associated with the second block, determining whether the coefficient is the last non-zero coefficient within the second block according to the second scanning order based on the determination of the first block.
19. The method of claim 17, wherein each of the horizontal coordinate and the vertical coordinate comprises a binarized coordinate such that the coordinate comprises a sequence of one or more bins, and wherein decoding each of the horizontal coordinate and the vertical coordinate comprises decoding a respective sequence.
20. The method of claim 19, wherein the sequence of one or more binary values comprises one of a unary codeword, a truncated unary codeword, an exponential golomb codeword, and a collocated codeword.
21. The method of claim 20, wherein the truncated unary codeword comprises:
a unary codeword comprising a variable number of first symbols followed by a second symbol, the variable number corresponding to the value of the coordinate, where the first symbol is different from the second symbol, where the respective coordinate has a value less than a predetermined truncated value; and is
A predetermined number of the first symbols, the predetermined number corresponding to the truncated value, in a case where the coordinate has a value greater than or equal to the truncated value.
22. The method of claim 20, wherein the concatenated codeword comprises a concatenation of a first codeword and a second codeword, wherein the first codeword is different from the second codeword.
23. The method of claim 19, wherein decoding each bin in the sequence comprises performing a context adaptive entropy coding process that includes applying a context model based on at least one context, wherein the at least one context includes a position of a respective bin within the sequence.
24. The method of claim 19, wherein decoding the horizontal coordinate and the vertical coordinate comprises:
decoding at least one binary value of the sequence corresponding to one of the coordinates based at least in part on a value of at least one binary value of the sequence corresponding to the other coordinate.
25. The method of claim 24, wherein decoding the at least one bin of the sequence corresponding to the one of the coordinates based at least in part on the value of the at least one bin of the sequence corresponding to the other coordinate comprises performing a context adaptive entropy coding process that includes applying a context model based on at least one context, wherein the at least one context includes the value of the at least one bin of the sequence corresponding to the one of the coordinates.
26. The method of claim 19, further comprising decoding the one or more bins of the sequence corresponding to the one coordinate and the one or more bins of the sequence corresponding to the other coordinate in an interleaved manner.
27. The method of claim 26, wherein at least one bin of each of the one or more bins of the sequence corresponding to the one coordinate and the one or more bins of the sequence corresponding to the other coordinate comprises a bin decoded using a conventional coding mode and at least one bin of each of the sequences comprises a bin decoded using a bypass coding mode, and wherein decoding the one or more bins of the sequence corresponding to the one coordinate and the one or more bins of the sequence corresponding to the other coordinate in the interleaved manner comprises:
decoding the at least one bin of the sequence corresponding to the one coordinate decoded using the normal coding mode prior to decoding the at least one bin of the one or more bins of the sequence corresponding to the other coordinate decoded using the normal coding mode, followed by decoding the at least one bin of the sequence corresponding to the one coordinate decoded using the bypass coding mode prior to decoding the at least one bin of the one or more bins of the sequence corresponding to the other coordinate decoded using the bypass coding mode.
28. The method of claim 1, wherein the scanning order comprises a first scanning order, wherein coding comprises decoding, and wherein decoding the information that identifies the positions of the other non-zero coefficients within the block comprises:
decoding a consecutive sequence of significant coefficient flags for one or more coefficients associated with the block, starting with the last non-zero coefficient within the block according to the scanning order and ending with a first coefficient within the block according to the scanning order, and continuing according to a second scanning order that is reverse relative to the first scanning order, wherein each of the significant coefficient flags indicates whether a respective coefficient is a non-zero coefficient; and
for each coefficient associated with the block, determining whether the coefficient is a non-zero coefficient based on the sequence.
29. The method of claim 1, wherein coding comprises decoding, and wherein decoding the information identifying the positions of the other non-zero coefficients within the block comprises:
decoding a contiguous sequence of flags for one or more coefficients associated with the block arranged into one or more groups, starting with a first coefficient within the block according to the scanning order and ending with the last non-zero coefficient within the block according to the scanning order, and continuing according to the scanning order, wherein each of the one or more groups comprises one or more of the coefficients,
wherein for each of the one or more groups, the sequence comprises one or more flags, wherein the one or more flags comprise a group flag indicating whether the one or more of the coefficients are all zero-valued coefficients, and when at least one of the one or more of the coefficients is a non-zero coefficient, the one or more flags further comprise a significant coefficient flag for each of the one or more of the coefficients, the significant coefficient flag indicating whether the respective coefficient is a non-zero coefficient; and
for each coefficient associated with the block, determining whether the coefficient is a non-zero coefficient based on the sequence.
30. The method of claim 1, wherein coding the information that identifies the position of the last non-zero coefficient within the block according to the scanning order and coding the information that identifies the positions of the other non-zero coefficients within the block each comprises performing a context adaptive entropy coding process that includes applying a context model based on at least one context, wherein the at least one context includes one of the information that identifies the position of the last non-zero coefficient within the block according to the scanning order and the information that identifies the positions of the other non-zero coefficients within the block.
31. An apparatus for coding coefficients associated with a block of video data during a video coding process, the apparatus comprising
A video coder configured to:
coding information identifying a position of a last non-zero coefficient within the block according to a scanning order associated with the block prior to coding information identifying positions of other non-zero coefficients within the block, wherein to code the information identifying the position of the last non-zero coefficient within the block according to the scanning order, the video coder is configured to perform at least one of:
coding a one-dimensional position within the block that identifies the position of the last non-zero coefficient within the block according to the scanning order;
coding a two-dimensional position within the block that identifies the position of the last non-zero coefficient within the block according to the scanning order; and
coding a flag indicating whether the last non-zero coefficient within the block according to the scanning order is located within a range of positions within the block, and coding the one-dimensional position within the block when the last non-zero coefficient within the block according to the scanning order is located within the range, and otherwise coding the two-dimensional position within the block.
32. The apparatus of claim 31, wherein the video coder comprises an entropy encoding unit, and wherein to code the one-dimensional position within the block that identifies the position of the last non-zero coefficient within the block according to the scanning order, the entropy encoding unit is configured to:
for each of one or more coefficients associated with the block, starting with a first coefficient within the block according to the scan order and ending with the last non-zero coefficient within the block according to the scan order, and continuing according to the scan order, determining whether the coefficient is the last non-zero coefficient within the block according to the scan order, and generating a last significant coefficient flag indicating whether the coefficient is the last non-zero coefficient within the block according to the scan order;
arranging the last significant coefficient flags for the one or more coefficients into a consecutive sequence based on the scan order; and
the sequence is encoded.
33. The apparatus of claim 31, wherein the video coder comprises an entropy encoding unit, and wherein to code the two-dimensional position within the block that identifies the position of the last non-zero coefficient within the block according to the scanning order, the entropy encoding unit is configured to:
determining a horizontal coordinate of the position of the last non-zero coefficient within the block according to the scan order;
determining a vertical coordinate of the position of the last non-zero coefficient within the block according to the scan order; and
encoding the horizontal coordinate and the vertical coordinate.
34. The apparatus of claim 33, wherein the block comprises a first block and the scanning order comprises a first scanning order, and wherein the entropy encoding unit is further configured to:
arranging coefficients associated with a second block into a consecutive sequence based on a second scanning order, wherein the second block is different from the first block and the second scanning order is different from the first scanning order; and
mapping the sequence into the first block using the first scan order to generate the first block.
35. The apparatus of claim 33, wherein to encode each of the horizontal coordinate and the vertical coordinate, the entropy encoding unit is configured to binarize the respective coordinate such that the coordinate comprises a sequence of one or more bins, and encode the sequence.
36. The apparatus of claim 35, wherein to encode the horizontal coordinate and the vertical coordinate, the entropy encoding unit is configured to:
encoding at least one bin of the sequence corresponding to one of the coordinates based at least in part on a value of the at least one bin of the sequence corresponding to the other coordinate.
37. The apparatus of claim 36, wherein to encode the at least one bin of the sequence corresponding to the one of the coordinates based at least in part on the value of the at least one bin of the sequence corresponding to the other coordinate, the entropy encoding unit is configured to perform a context adaptive entropy coding process that includes the entropy encoding unit applying a context model based on at least one context, wherein the at least one context includes the value of the at least one bin of the sequence corresponding to the one of the coordinates.
38. The apparatus of claim 35, wherein the entropy encoding unit is further configured to encode the one or more bins of the sequence corresponding to the one coordinate and the one or more bins of the sequence corresponding to the other coordinate in an interleaved manner.
39. The apparatus of claim 31, wherein the video coder comprises an entropy encoding unit, wherein the scanning order comprises a first scanning order, and wherein to code the information that identifies the positions of the other non-zero coefficients within the block, the entropy encoding unit is configured to:
for each of one or more coefficients associated with the block, starting with the last non-zero coefficient within the block according to the scanning order and ending with a first coefficient within the block according to the scanning order, and proceeding according to a second scanning order that is reverse relative to the first scanning order, determining whether the coefficient is a non-zero coefficient, and generating a significant coefficient flag indicating whether the coefficient is a non-zero coefficient;
arranging the significant coefficient flags for the one or more coefficients into a consecutive sequence based on the second scanning order; and
the sequence is encoded.
40. The apparatus of claim 31, wherein the video coder comprises an entropy encoding unit, and wherein to code the information that identifies the positions of the other non-zero coefficients within the block, the entropy encoding unit is configured to:
arranging one or more coefficients associated with the block into one or more groups, starting with a first coefficient within the block according to the scanning order and ending with the last non-zero coefficient within the block according to the scanning order, and continuing according to the scanning order, wherein each of the one or more groups comprises one or more of the coefficients;
for each of the one or more groups, determining whether the one or more of the coefficients are non-zero coefficients and generating one or more flags, wherein the one or more flags comprise a group flag indicating whether the one or more of the coefficients are all zero-valued coefficients, and when at least one of the one or more of the coefficients is a non-zero coefficient, the one or more flags further comprise a significant coefficient flag for each of the one or more of the coefficients, the significant coefficient flag indicating whether the respective coefficient is a non-zero coefficient;
arranging the one or more flags of the one or more groups into a consecutive sequence based on the scan order; and
the sequence is encoded.
41. The apparatus of claim 31, wherein the video coder comprises an entropy decoding unit, and wherein to code the one-dimensional position within the block that identifies the position of the last non-zero coefficient within the block according to the scanning order, the entropy decoding unit is configured to:
decoding a consecutive sequence of last significant coefficient flags for one or more coefficients associated with the block, starting with a first coefficient within the block according to the scanning order and ending with the last non-zero coefficient within the block according to the scanning order, and continuing according to the scanning order, wherein each of the last significant coefficient flags indicates whether a respective coefficient is the last non-zero coefficient within the block according to the scanning order; and
for each coefficient associated with the block, determining whether the coefficient is the last non-zero coefficient within the block according to the scan order based on the sequence.
42. The apparatus of claim 31, wherein the video coder comprises an entropy decoding unit, and wherein to code the two-dimensional position within the block that identifies the position of the last non-zero coefficient within the block according to the scanning order, the entropy decoding unit is configured to:
decoding a horizontal coordinate of the position of the last non-zero coefficient within the block according to the scan order;
decoding a vertical coordinate of the position of the last non-zero coefficient within the block according to the scan order; and
for each coefficient associated with the block, determining whether the coefficient is the last non-zero coefficient within the block according to the scan order based on the horizontal coordinate and the vertical coordinate.
43. The apparatus of claim 42, wherein the block comprises a first block and the scanning order comprises a first scanning order, and wherein the entropy decoding unit is further configured to:
arranging coefficients associated with the first block into a consecutive sequence based on the first scanning order;
mapping the sequence into a second block using a second scanning order to generate the second block, wherein the second block is different from the first block and the second scanning order is different from the first scanning order; and
for each coefficient associated with the second block, determining whether the coefficient is the last non-zero coefficient within the second block according to the second scanning order based on the determination of the first block.
44. The apparatus of claim 42, wherein each of the horizontal coordinate and the vertical coordinate comprises a binarized coordinate such that the coordinate comprises a sequence of one or more bins, and wherein to decode each of the horizontal coordinate and the vertical coordinate, the entropy decoding unit is configured to decode a respective sequence.
45. The apparatus of claim 44, wherein to decode the horizontal coordinate and the vertical coordinate, the entropy decoding unit is configured to:
decoding at least one binary value of the sequence corresponding to one of the coordinates based at least in part on a value of at least one binary value of the sequence corresponding to the other coordinate.
46. The apparatus of claim 45, wherein to decode the at least one bin of the sequence corresponding to the one of the coordinates based at least in part on the value of the at least one bin of the sequence corresponding to the other coordinate, the entropy decoding unit is configured to perform a context adaptive entropy coding process that includes the entropy decoding unit applying a context model based on at least one context, wherein the at least one context includes the value of the at least one bin of the sequence corresponding to the one of the coordinates.
47. The apparatus of claim 44, wherein the entropy decoding unit is further configured to decode the one or more bins of the sequence corresponding to the one coordinate and the one or more bins of the sequence corresponding to the other coordinate in an interleaved manner.
48. The apparatus of claim 31, wherein the video coder comprises an entropy decoding unit, wherein the scanning order comprises a first scanning order, and wherein to code the information that identifies the positions of the other non-zero coefficients within the block, the entropy decoding unit is configured to:
decoding a consecutive sequence of significant coefficient flags for one or more coefficients associated with the block, starting with the last non-zero coefficient within the block according to the scanning order and ending with a first coefficient within the block according to the scanning order, and continuing according to a second scanning order that is reverse relative to the first scanning order, wherein each of the significant coefficient flags indicates whether a respective coefficient is a non-zero coefficient; and
for each coefficient associated with the block, determining whether the coefficient is a non-zero coefficient based on the sequence.
49. The apparatus of claim 31, wherein the video coder comprises an entropy decoding unit, and wherein to code the information that identifies the positions of the other non-zero coefficients within the block, the entropy decoding unit is configured to:
decoding a contiguous sequence of flags for one or more coefficients associated with the block arranged into one or more groups, wherein each of the one or more groups comprises one or more of the coefficients, starting with a first coefficient within the block according to the scan order and ending with the last non-zero coefficient within the block according to the scan order, and continuing according to the scan order, wherein the sequence comprises, for each of the one or more groups, one or more flags, wherein the one or more flags comprise a group flag indicating whether the one or more of the coefficients are all zero-valued coefficients, and when at least one of the one or more of the coefficients is a non-zero coefficient, the one or more flags further comprise a flag for each of the one or more of the coefficients A significant coefficient flag of the same indicating whether the respective coefficient is a non-zero coefficient; and
for each coefficient associated with the block, determining whether the coefficient is a non-zero coefficient based on the sequence.
50. The apparatus of claim 31, wherein to code the information that identifies the position of the last non-zero coefficient within the block according to the scanning order and to code the information that identifies the positions of the other non-zero coefficients within the block, the video coder is configured to perform a context adaptive entropy coding process that includes the video coder applying a context model based on at least one context, wherein the at least one context includes one of the information that identifies the position of the last non-zero coefficient within the block according to the scanning order and the information that identifies the positions of the other non-zero coefficients within the block.
51. The apparatus of claim 31, wherein the apparatus comprises at least one of:
an integrated circuit;
a microprocessor; and
a wireless communication device that includes the video coder.
52. A device for coding coefficients associated with a block of video data during a video coding process, the device comprising:
means for coding information identifying a position of a last non-zero coefficient within the block according to a scanning order associated with the block prior to coding information identifying positions of other non-zero coefficients within the block, wherein the means for coding the information identifying the position of the last non-zero coefficient within the block according to the scanning order includes at least one of:
means for coding a one-dimensional position within the block that identifies the position of the last non-zero coefficient within the block according to the scanning order;
means for coding a two-dimensional position within the block that identifies the position of the last non-zero coefficient within the block according to the scanning order; and
means for performing the following: coding a flag indicating whether the last non-zero coefficient within the block according to the scanning order is located within a range of positions within the block, and coding the one-dimensional position within the block when the last non-zero coefficient within the block according to the scanning order is located within the range, and otherwise coding the two-dimensional position within the block.
53. The device of claim 52, wherein coding comprises encoding, and wherein means for encoding the one-dimensional position within the block that identifies the position of the last non-zero coefficient within the block according to the scanning order comprises:
means for performing the following: for each of one or more coefficients associated with the block, starting with a first coefficient within the block according to the scan order and ending with the last non-zero coefficient within the block according to the scan order, and continuing according to the scan order, determining whether the coefficient is the last non-zero coefficient within the block according to the scan order, and generating a last significant coefficient flag indicating whether the coefficient is the last non-zero coefficient within the block according to the scan order;
means for arranging the last significant coefficient flags for the one or more coefficients into a consecutive sequence based on the scan order; and
means for encoding the sequence.
54. The device of claim 52, wherein coding comprises encoding, and wherein means for encoding the two-dimensional position within the block that identifies the position of the last non-zero coefficient within the block according to the scanning order comprises:
means for determining a horizontal coordinate of the position of the last non-zero coefficient within the block according to the scan order;
means for determining a vertical coordinate of the position of the last non-zero coefficient within the block according to the scan order; and
means for encoding the horizontal coordinate and the vertical coordinate.
55. The device of claim 54, wherein the block comprises a first block and the scanning order comprises a first scanning order, the device further comprising:
means for arranging coefficients associated with a second block into a consecutive sequence based on a second scanning order, wherein the second block is different from the first block, and the second scanning order is different from the first scanning order; and
means for mapping the sequence into the first block using the first scanning order to generate the first block.
56. The device of claim 54, wherein the means for encoding each of the horizontal and vertical coordinates comprises means for binarizing the respective coordinate such that the coordinate comprises a sequence of one or more bins, and means for encoding the sequence.
57. The device of claim 56, wherein the means for encoding the horizontal coordinate and the vertical coordinate comprises:
means for encoding at least one bin of the sequence corresponding to one of the coordinates based at least in part on a value of the at least one bin of the sequence corresponding to the other coordinate.
58. The device of claim 57, wherein the means for encoding the at least one bin of the sequence corresponding to the one of the coordinates based at least in part on the value of the at least one bin of the sequence corresponding to the other coordinate comprises means for performing a context adaptive entropy coding process that includes means for applying a context model based on at least one context, wherein the at least one context includes the value of the at least one bin of the sequence corresponding to the one of the coordinates.
59. The device of claim 56, further comprising means for encoding the one or more bins of the sequence corresponding to the one coordinate and the one or more bins of the sequence corresponding to the other coordinate in an interleaved manner.
60. The device of claim 52, wherein the scanning order comprises a first scanning order, wherein coding comprises encoding, and wherein means for encoding the information identifying the positions of the other non-zero coefficients within the block comprises:
means for performing the following: for each of one or more coefficients associated with the block, starting with the last non-zero coefficient within the block according to the scanning order and ending with a first coefficient within the block according to the scanning order, and proceeding according to a second scanning order that is reverse relative to the first scanning order, determining whether the coefficient is a non-zero coefficient, and generating a significant coefficient flag indicating whether the coefficient is a non-zero coefficient;
means for arranging the significant coefficient flags for the one or more coefficients into a consecutive sequence based on the second scanning order; and
means for encoding the sequence.
61. The device of claim 52, wherein coding comprises encoding, and wherein the means for encoding the information identifying the positions of the other non-zero coefficients within the block comprises:
means for performing the following: arranging one or more coefficients associated with the block into one or more groups, starting with a first coefficient within the block according to the scanning order and ending with the last non-zero coefficient within the block according to the scanning order, and continuing according to the scanning order, wherein each of the one or more groups comprises one or more of the coefficients;
means for performing the following: for each of the one or more groups, determining whether the one or more of the coefficients are non-zero coefficients and generating one or more flags, wherein the one or more flags comprise a group flag indicating whether the one or more of the coefficients are all zero-valued coefficients, and when at least one of the one or more of the coefficients is a non-zero coefficient, the one or more flags further comprise a significant coefficient flag for each of the one or more of the coefficients, the significant coefficient flag indicating whether the respective coefficient is a non-zero coefficient;
means for arranging the one or more flags of the one or more groups into a consecutive sequence based on the scan order; and
means for encoding the sequence.
62. The device of claim 52, wherein coding comprises decoding, and wherein means for decoding the one-dimensional position within the block that identifies the position of the last non-zero coefficient within the block according to the scanning order comprises:
means for performing the following: decoding a consecutive sequence of last significant coefficient flags for one or more coefficients associated with the block, starting with a first coefficient within the block according to the scanning order and ending with the last non-zero coefficient within the block according to the scanning order, and continuing according to the scanning order, wherein each of the last significant coefficient flags indicates whether a respective coefficient is the last non-zero coefficient within the block according to the scanning order; and
means for performing the following: for each coefficient associated with the block, determining whether the coefficient is the last non-zero coefficient within the block according to the scan order based on the sequence.
63. The device of claim 52, wherein coding comprises decoding, and wherein means for decoding the two-dimensional position within the block comprises:
means for decoding a horizontal coordinate of the position of the last non-zero coefficient within the block according to the scan order;
means for decoding a vertical coordinate of the position of the last non-zero coefficient within the block according to the scan order; and
means for performing the following: for each coefficient associated with the block, determining whether the coefficient is the last non-zero coefficient within the block according to the scan order based on the horizontal coordinate and the vertical coordinate.
64. The device of claim 63, wherein the block comprises a first block and the scanning order comprises a first scanning order, and wherein the device further comprises:
means for arranging coefficients associated with the first block into a consecutive sequence based on the first scanning order;
means for mapping the sequence into a second block using a second scanning order to generate the second block, wherein the second block is different from the first block, and the second scanning order is different from the first scanning order; and
means for performing the following: for each coefficient associated with the second block, determining whether the coefficient is the last non-zero coefficient within the second block according to the second scanning order based on the determination of the first block.
65. The device of claim 63, wherein each of the horizontal coordinate and the vertical coordinate comprises a binarized coordinate such that the coordinate comprises a sequence of one or more bins, and wherein the means for decoding each of the horizontal coordinate and the vertical coordinate comprises means for decoding a respective sequence.
66. The device of claim 65, wherein the means for decoding the horizontal coordinate and the vertical coordinate comprises:
means for decoding at least one binary value of the sequence corresponding to one of the coordinates based at least in part on a value of the at least one binary value of the sequence corresponding to the other coordinate.
67. The device of claim 66, wherein the means for decoding the at least one bin of the sequence corresponding to the one of the coordinates based at least in part on the value of the at least one bin of the sequence corresponding to the other coordinate comprises means for performing a context adaptive entropy coding process that includes means for applying a context model based on at least one context, wherein the at least one context includes the value of the at least one bin of the sequence corresponding to the one of the coordinates.
68. The device of claim 65, further comprising means for decoding the one or more bins of the sequence corresponding to the one coordinate and the one or more bins of the sequence corresponding to the other coordinate in an interleaved manner.
69. The device of claim 52, wherein the scanning order comprises a first scanning order, wherein coding comprises decoding, and wherein means for decoding the information that identifies the positions of the other non-zero coefficients within the block comprises:
means for performing the following: decoding a consecutive sequence of significant coefficient flags for one or more coefficients associated with the block, starting with the last non-zero coefficient within the block according to the scanning order and ending with a first coefficient within the block according to the scanning order, and continuing according to a second scanning order that is reverse relative to the first scanning order, wherein each of the significant coefficient flags indicates whether a respective coefficient is a non-zero coefficient; and
means for performing the following: for each coefficient associated with the block, determining whether the coefficient is a non-zero coefficient based on the sequence.
70. The device of claim 52, wherein coding comprises decoding, and wherein the means for decoding the information identifying the positions of the other non-zero coefficients within the block comprises:
means for performing the following: decoding a contiguous sequence of flags for one or more coefficients associated with the block arranged into one or more groups, wherein each of the one or more groups comprises one or more of the coefficients, starting with a first coefficient within the block according to the scan order and ending with the last non-zero coefficient within the block according to the scan order, and continuing according to the scan order, wherein the sequence comprises, for each of the one or more groups, one or more flags, wherein the one or more flags comprise a group flag indicating whether the one or more of the coefficients are all zero-valued coefficients, and when at least one of the one or more of the coefficients is a non-zero coefficient, the one or more flags further comprise a flag for each of the one or more of the coefficients A significant coefficient flag of the same indicating whether the respective coefficient is a non-zero coefficient; and
means for performing the following: for each coefficient associated with the block, determining whether the coefficient is a non-zero coefficient based on the sequence.
71. The device of claim 52, wherein the means for coding the information that identifies the position of the last non-zero coefficient within the block according to the scanning order and the means for coding the information that identifies the positions of the other non-zero coefficients within the block each comprise means for performing a context adaptive entropy coding process that includes one of means for applying a context model based on at least one context, wherein the at least one context includes the information that identifies the position of the last non-zero coefficient within the block according to the scanning order and the information that identifies the positions of the other non-zero coefficients within the block.
72. A computer-readable medium comprising instructions that upon execution cause a processor to code coefficients associated with a block of video data during a video coding process, wherein the instructions cause the processor to:
coding information identifying a position of a last non-zero coefficient within the block according to a scanning order associated with the block prior to coding information identifying positions of other non-zero coefficients within the block, wherein the instructions that cause the processor to code the information identifying the position of the last non-zero coefficient within the block according to the scanning order comprise instructions that cause the processor to perform at least one of:
coding a one-dimensional position within the block that identifies the position of the last non-zero coefficient within the block according to the scanning order;
coding a two-dimensional position within the block that identifies the position of the last non-zero coefficient within the block according to the scanning order; and
coding a flag indicating whether the last non-zero coefficient within the block according to the scanning order is located within a range of positions within the block, and coding the one-dimensional position within the block when the last non-zero coefficient within the block according to the scanning order is located within the range, and otherwise coding the two-dimensional position within the block.
73. The computer-readable medium of claim 72, wherein the instructions that cause the processor to code the one-dimensional position within the block that identifies the position of the last non-zero coefficient within the block according to the scanning order comprise instructions that cause the processor to encode the one-dimensional position, the instructions cause the processor to:
for each of one or more coefficients associated with the block, starting with a first coefficient within the block according to the scan order and ending with the last non-zero coefficient within the block according to the scan order, and continuing according to the scan order, determining whether the coefficient is the last non-zero coefficient within the block according to the scan order, and generating a last significant coefficient flag indicating whether the coefficient is the last non-zero coefficient within the block according to the scan order;
arranging the last significant coefficient flags for the one or more coefficients into a consecutive sequence based on the scan order; and
the sequence is encoded.
74. The computer-readable medium of claim 72, wherein the instructions that cause the processor to code the two-dimensional position within the block that identifies the position of the last non-zero coefficient within the block according to the scanning order comprise instructions that cause the processor to encode the two-dimensional position, the instructions cause the processor to:
determining a horizontal coordinate of the position of the last non-zero coefficient within the block according to the scan order;
determining a vertical coordinate of the position of the last non-zero coefficient within the block according to the scan order; and
encoding the horizontal coordinate and the vertical coordinate.
75. The computer-readable medium of claim 74, wherein the block comprises a first block and the scanning order comprises a first scanning order, further comprising instructions that cause the processor to:
arranging coefficients associated with a second block into a consecutive sequence based on a second scanning order, wherein the second block is different from the first block and the second scanning order is different from the first scanning order; and
mapping the sequence into the first block using the first scan order to generate the first block.
76. The computer-readable medium of claim 74, wherein the instructions that cause the processor to encode each of the horizontal and vertical coordinates comprise instructions that cause the processor to binarize the respective coordinate such that the coordinate comprises a sequence of one or more bins, and instructions that cause the processor to encode the sequence.
77. The computer-readable medium of claim 76, wherein the instructions that cause the processor to encode the horizontal coordinate and the vertical coordinate comprise:
instructions that cause the processor to encode at least one bin of the sequence corresponding to one of the coordinates based at least in part on a value of the at least one bin of the sequence corresponding to the other coordinate.
78. The computer-readable medium of claim 77, wherein the instructions that cause the processor to encode the at least one bin of the sequence corresponding to the one of the coordinates based at least in part on the value of the at least one bin of the sequence corresponding to the other coordinate comprise instructions that cause the processor to perform a context adaptive entropy coding process that includes applying a context model based on at least one context, wherein the at least one context includes the value of the at least one bin of the sequence corresponding to the one of the coordinates.
79. The computer-readable medium of claim 76, further comprising instructions that cause the processor to encode the one or more bins of the sequence corresponding to the one coordinate and the one or more bins of the sequence corresponding to the other coordinate in an interleaved manner.
80. The computer-readable medium of claim 72, wherein the scanning order comprises a first scanning order, and wherein the instructions that cause the processor to code the information that identifies the positions of the other non-zero coefficients within the block comprise instructions that cause the processor to encode the information that cause the processor to:
for each of one or more coefficients associated with the block, starting with the last non-zero coefficient within the block according to the scanning order and ending with a first coefficient within the block according to the scanning order, and proceeding according to a second scanning order that is reverse relative to the first scanning order, determining whether the coefficient is a non-zero coefficient, and generating a significant coefficient flag indicating whether the coefficient is a non-zero coefficient;
arranging the significant coefficient flags for the one or more coefficients into a consecutive sequence based on the second scanning order; and
the sequence is encoded.
81. The computer-readable medium of claim 72, wherein the instructions that cause the processor to code the information identifying the positions of the other non-zero coefficients within the block comprise instructions that cause the processor to encode the information, the instructions cause the processor to:
arranging one or more coefficients associated with the block into one or more groups, starting with a first coefficient within the block according to the scanning order and ending with the last non-zero coefficient within the block according to the scanning order, and continuing according to the scanning order, wherein each of the one or more groups comprises one or more of the coefficients;
for each of the one or more groups, determining whether the one or more of the coefficients are non-zero coefficients and generating one or more flags, wherein the one or more flags comprise a group flag indicating whether the one or more of the coefficients are all zero-valued coefficients, and when at least one of the one or more of the coefficients is a non-zero coefficient, the one or more flags further comprise a significant coefficient flag for each of the one or more of the coefficients, the significant coefficient flag indicating whether the respective coefficient is a non-zero coefficient;
arranging the one or more flags of the one or more groups into a consecutive sequence based on the scan order; and
the sequence is encoded.
82. The computer-readable medium of claim 72, wherein the instructions that cause the processor to code the one-dimensional position within the block that identifies the position of the last non-zero coefficient within the block according to the scanning order comprise instructions that cause the processor to decode the one-dimensional position, the instructions cause the processor to:
decoding a consecutive sequence of last significant coefficient flags for one or more coefficients associated with the block, starting with a first coefficient within the block according to the scanning order and ending with the last non-zero coefficient within the block according to the scanning order, and continuing according to the scanning order, wherein each of the last significant coefficient flags indicates whether a respective coefficient is the last non-zero coefficient within the block according to the scanning order; and
for each coefficient associated with the block, determining whether the coefficient is the last non-zero coefficient within the block according to the scan order based on the sequence.
83. The computer-readable medium of claim 72, wherein the instructions that cause the processor to code the two-dimensional position within the block that identifies the position of the last non-zero coefficient within the block according to the scanning order comprise instructions that cause the processor to decode the two-dimensional position, the instructions cause the processor to:
decoding a horizontal coordinate of the position of the last non-zero coefficient within the block according to the scan order;
decoding a vertical coordinate of the position of the last non-zero coefficient within the block according to the scan order; and
for each coefficient associated with the block, determining whether the coefficient is the last non-zero coefficient within the block according to the scan order based on the horizontal coordinate and the vertical coordinate.
84. The computer-readable medium of claim 83, wherein the block comprises a first block and the scanning order comprises a first scanning order, further comprising instructions that cause the processor to:
arranging coefficients associated with the first block into a consecutive sequence based on the first scanning order;
mapping the sequence into a second block using a second scanning order to generate the second block, wherein the second block is different from the first block and the second scanning order is different from the first scanning order; and
for each coefficient associated with the second block, determining whether the coefficient is the last non-zero coefficient within the second block according to the second scanning order based on the determination of the first block.
85. The computer-readable medium of claim 83, wherein each of the horizontal coordinate and the vertical coordinate comprises a binarized coordinate such that the coordinate comprises a sequence of one or more bins, and wherein the instructions that cause the processor to decode each of the horizontal coordinate and the vertical coordinate comprise instructions that cause the processor to decode a respective sequence.
86. The computer-readable medium of claim 85, wherein the instructions that cause the processor to decode the horizontal coordinate and the vertical coordinate comprise:
instructions that cause the processor to decode at least one bin of the sequence corresponding to one of the coordinates based at least in part on a value of the at least one bin of the sequence corresponding to the other coordinate.
87. The computer-readable medium of claim 86, wherein the instructions that cause the processor to decode the at least one bin of the sequence corresponding to the one of the coordinates based at least in part on the value of the at least one bin of the sequence corresponding to the other coordinate comprise instructions that cause the processor to perform a context adaptive entropy coding process that includes applying a context model based on at least one context, wherein the at least one context includes the value of the at least one bin of the sequence corresponding to the one of the coordinates.
88. The computer-readable medium of claim 85, further comprising instructions that cause the processor to decode the one or more bins of the sequence corresponding to the one coordinate and the one or more bins of the sequence corresponding to the other coordinate in an interleaved manner.
89. The computer-readable medium of claim 72, wherein the scanning order comprises a first scanning order, and wherein the instructions that cause the processor to code the information that identifies the positions of the other non-zero coefficients within the block comprise instructions that cause the processor to decode the information, the instructions cause the processor to:
decoding a consecutive sequence of significant coefficient flags for one or more coefficients associated with the block, starting with the last non-zero coefficient within the block according to the scanning order and ending with a first coefficient within the block according to the scanning order, and continuing according to a second scanning order that is reverse relative to the first scanning order, wherein each of the significant coefficient flags indicates whether a respective coefficient is a non-zero coefficient; and
for each coefficient associated with the block, determining whether the coefficient is a non-zero coefficient based on the sequence.
90. The computer-readable medium of claim 72, wherein the instructions that cause the processor to code the information identifying the positions of the other non-zero coefficients within the block comprise instructions that cause the processor to decode the information, the instructions cause the processor to:
decoding a contiguous sequence of flags for one or more coefficients associated with the block arranged into one or more groups, wherein each of the one or more groups comprises one or more of the coefficients, starting with a first coefficient within the block according to the scan order and ending with the last non-zero coefficient within the block according to the scan order, and continuing according to the scan order, wherein the sequence comprises, for each of the one or more groups, one or more flags, wherein the one or more flags comprise a group flag indicating whether the one or more of the coefficients are all zero-valued coefficients, and when at least one of the one or more of the coefficients is a non-zero coefficient, the one or more flags further comprise a flag for each of the one or more of the coefficients A significant coefficient flag of the same indicating whether the respective coefficient is a non-zero coefficient; and
for each coefficient associated with the block, determining whether the coefficient is a non-zero coefficient based on the sequence.
91. The computer-readable medium of claim 72, wherein the instructions that cause the processor to code the information identifying the position of the last non-zero coefficient within the block according to the scanning order and the instructions that cause the processor to code the information identifying the positions of the other non-zero coefficients within the block each comprise instructions that cause the processor to perform a context adaptive entropy coding process that includes applying a context model based on at least one context, wherein the at least one context includes one of the information identifying the position of the last non-zero coefficient within the block according to the scanning order and the information identifying the positions of the other non-zero coefficients within the block.
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US61/419,740 | 2010-12-03 | ||
| US13/302,996 | 2011-11-22 |
Related Parent Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| HK18110581.4A Division HK1251388A1 (en) | 2010-12-03 | 2013-11-21 | Separately coding the position of a last significant coefficient of a video block in video coding |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| HK18110581.4A Addition HK1251388A1 (en) | 2010-12-03 | 2013-11-21 | Separately coding the position of a last significant coefficient of a video block in video coding |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| HK1185742A true HK1185742A (en) | 2014-02-21 |
| HK1185742B HK1185742B (en) | 2019-07-12 |
Family
ID=
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11330272B2 (en) | Using a most probable scanning order to efficiently code scanning order information for a video block in video coding | |
| CA2817360C (en) | Separately coding the position of a last significant coefficient of a video block in video coding | |
| CA2818436C (en) | Coding the position of a last significant coefficient within a video block based on a scanning order for the block in video coding | |
| US20120163448A1 (en) | Coding the position of a last significant coefficient of a video block in video coding | |
| US20120163472A1 (en) | Efficiently coding scanning order information for a video block in video coding | |
| HK40007991A (en) | Separately coding the position of a last significant coefficient of a video block in video coding | |
| HK40007991B (en) | Separately coding the position of a last significant coefficient of a video block in video coding | |
| HK1185742A (en) | Separately coding the position of a last significant coefficient of a video block in video coding | |
| HK1185742B (en) | Separately coding the position of a last significant coefficient of a video block in video coding | |
| HK1251388A1 (en) | Separately coding the position of a last significant coefficient of a video block in video coding | |
| HK1259684B (en) | Coding the position of a last significant coefficient within a video block based on a scanning order for the block in video coding | |
| HK1259684A1 (en) | Coding the position of a last significant coefficient within a video block based on a scanning order for the block in video coding | |
| HK1185488B (en) | Coding the position of a last significant coefficient within a video block based on a scanning order for the block in video coding |