This disclosure relates to image and video compression, and more specifically to transforms used in performing image and video compression.
In general, discrete sine transforms (DSTs) and discrete cosine transforms (DCTs) are used in source coding for image, speech, audio and video data. The type II DCT typically is at the core of standards for image and video compression, such as Joint Photographic Experts Group (JPEG), H.26x-series video coding, and the Motion Pictures Experts Group (MPEG) 1-4 standards. The type-1 DST was suggested as a basis for a recursive block coding technique for video coding. The type IV DCT and type IV DST are both found in fast implementations of Lapped Orthogonal Transforms, which are used in speech and audio coding standards, such as G.722.1, G.718, and the MPEG AAC-family.
Through the extensive use of DCTs and DSTs of types I, II, III, and IV (which are often referred to as “even” transforms) in coding image, video, speech and audio data, many different factorizations and fast algorithms for implementing these transforms have been developed it improve precision and promote reduced computational complexity. The so-called “odd-type” DCTs and DSTs of types V, VI, VII, and VIII, however, have not been widely used for purposes of coding image, video, speech and audio data. For this reason, implementations of these transforms have been underdeveloped, resulting in implementations of the odd transforms that tend to be slow and computationally complex.
In general, this disclosure presents techniques for implementing a fast algorithm for implementing odd-type DCTs and DSTs. The techniques include the computation of an odd-type transform on any real-valued sequence of data (e.g., residual values in a video coding process or a block of pixel values of an image coding process) by mapping the odd-type transform to a discrete Fourier transform (DFT). The techniques include a mapping between the real-valued data sequence to an intermediate sequence to be used as an input to a DFT. Using this intermediate sequence, an odd-type transform may be achieved by calculating a DFT of odd size. Fast algorithms for a DFT may be then be used, and as a result, the odd-type transform may be calculated in a manner that requires less computational complexity, potentially improving the speed with which such odd-type transforms may be performed.
In one embodiment, the invention is directed to a method for computing an odd-type discrete sine transform (DST) or discrete cosine transform (DCT) in a video or image coding process. The method includes receiving a sequence of real-valued data on which to perform an odd-type transform, mapping the sequence of real-valued data to an intermediate sequence, and applying the intermediate sequence as an input to a discrete Fourier transform (DFT) to produce transformed data according to the odd-type transform. The odd-type transform comprises one of a DST of type V, a DCT of type V, a DST of type VI, a DCT of type VI, a DST of type VII, a DCT of type VII, a DST of type VIII, and a DCT of type VIII.
In another embodiment, the invention is directed to an apparatus configured to compute an odd-type discrete sine transform (DST) or discrete cosine transform (DCT) in a video or image coding process. The apparatus includes a coding module configured to receive a sequence of real-valued data on which to perform an odd-type transform, a mapping unit configured to map the sequence of real-valued data to an intermediate sequence, and a transform module configured to apply the intermediate sequence as an input to a discrete Fourier transform (DFT) to produce transformed data according to the odd-type transform.
In another embodiment, the invention is directed to a computer program product comprising a computer-readable storage medium having, stored thereon instructions for a processor of a device configured to compute an odd-type discrete sine transform (DST) or discrete cosine transform (DCT) in a video or image coding process. The instructions cause the processor to receive a sequence of real-valued data on which to perform an odd-type transform, map the sequence of real-valued data to an intermediate sequence, and apply the intermediate sequence as an input to a discrete Fourier transform (DFT) to produce transformed data according to the odd-type transform.
The details of one or more embodiments of the invention are set forth in the accompanying drawings and the description below. Other features, objects, and advantages of the invention will be apparent from the description and drawings, and from the claims.
In general, this disclosure presents techniques for implementing a fast algorithm for calculating “odd” type transforms, and in particular, DCTs or DSTs of types VI and VII. A transform is a mathematical algorithm that transforms an original function (often a function in the time domain) into a transformed function in the frequency domain. Transforms have many uses in computing, including solving partial differential equations, performing convolutions, multiplying large integers, lossy compression of audio (e.g., in MP3 encoding), image compression (e.g., in JPEG encoding), and video compressions (e.g., in the H.264 or high efficiency video coding (HEVC) standards).
Odd-type transforms (i.e., DCTs and DSTs of types V, VII, VII, and VIII) have not traditionally been widely used in video and image compression techniques. For one reason, fast algorithms for implementing the odd-type transforms have not been developed. However, the DST of type VI has shown recent promise for use in image/video coding. In particular, the DST of type VI can be obtained as an approximation of the Karhunen-Loeve transform (KLT) for residual signals, such as ones produced after a prediction process in video coding (e.g., intra-prediction or inter-prediction). In particular, the DST of type VI has been shown to offer better performance in situations where the variances of residual values from intra-prediction increase in conjunction with distance from the edge of a block. Further, these transforms were recently adopted in the high efficiency video coding (HEVC) standard.
This disclosure proposes structures and techniques for a fast implementation of an odd-type transform. The techniques of this disclosure will be described in general, and with reference to image and video coding. However, it should be understood that the fast implementation techniques of this disclosure are applicable for any use of an odd-type transform.
This disclosure proposes techniques for computing an odd-type transform on any real-valued sequence of data (e.g., residual values in a video coding process or a block of pixel values of an image coding process) by mapping the odd-type transform to a discrete Fourier transform (DFT). More specifically, this disclosure proposes a mapping between the real-valued data sequence to an intermediate sequence to be used as an input to a DFT. Using this intermediate sequence, an odd-type transform may be achieved by calculating a DFT of odd size. Conventionally known fast algorithms for a DFT may be used, and as such, the odd-type transform may be calculated in a fast manner.
The following will describe the solution for mapping DCTs and DSTs of type VI and VII to a DFT using an intermediate sequence. First, let x(n), n=0, . . . , N−1 represent a real-valued input data sequence (e.g., a sequence or matrix of residual values from intra-prediction in a video coding process). The discrete Fourier transform (DFT) and DCTs/DSTs of types II, III, VI and VI are defined over this sequence as follows:
For simplicity, in these definitions the usual normalization factors have been omitted (√{umlaut over (2)}{umlaut over (/)}{umlaut over (N)} for type-II and III and 2/√{umlaut over (2)}{umlaut over (N)}{umlaut over (+)}{umlaut over (1)} for type VI and VII transforms).
The goal is to compute values XSVI (n), n=0, . . . ,N−1, which is a DST of type VI of the input data sequence. Initially, consider first a case when the number of values in the input data sequence (i.e., N) is even. As one example, N could represent the block size of an image or video block to be coded (e.g., a 16×16 block). For an input data sequence x(n) with an even number of values, the disclosure proposes a mapping to an intermediate sequence y(n), n=0, . . . , 2N as follows:
In examples where the sequence of real-valued data has an odd number of values (e.g., an odd block sizes), a slightly different mapping for the intermediate sequence y(n), n=0, . . . , 2N is used:
Using either mapping for the intermediate sequence, let YF(k) be the DFT of the sequence y(n). Using the intermediate sequence y(n), a mapping between the DST of type VI and a DFT can be shown as follows:
Then:
In other words, an N-point DST of type VI can be mapped to a DFT of size 2N+1 (i.e., a DFT of odd length). The variable Y represents the sequence of values computed by the DFT, while the variable X represents the computed sequence of the odd-type transform (in this case, a DST of type VI). More specifically, using the mapping of the intermediate sequence y(n), a DST of type VI can be mapped to the imaginary values of a DFT of size 2N+1 at each 2k+1 index (i.e., each odd index). Since fast algorithms and fast factorizations are well known for DFTs (e.g., fast Fourier transforms (FFTs)), this mapping also allows for fast factorizations and fast algorithms for a DST of type VI. Three examples of fast algorithms that may be used are the Winograd algorithm for short prime lengths, the Winograd Fourier Transform Algorithm (WFTA), and prime factorization algorithm (PFA). A Winograd factorization of a DFT of length 9 has shown to perform well.
Similarly to the DST of type VI, the DCT of type VI can be obtained with the same mapping and results in a relationship to the real values of a DFT of size 2N+1 as follows:
An N-point DCT of type VI can be mapped to a DFT of size 2N+1 (i.e., a DFT of odd length). More specifically, using the mapping of the intermediate sequence y(n), a DCT of type VI can be mapped to the real values of a DFT of size 2N+1 at each 2k+1 index (i.e., each odd index). Again, since fast algorithms and fast factorizations are well known for DFTs (e.g., fast Fourier transforms (FFTs)), this mapping also allows for fast factorizations and fast algorithms for a DCT of type VI.
This disclosure has established the equivalence between N-point DST/DCT of type VI and real/imaginary values of a 2N+1-point DFT. In order to complete the construction of the transform, any suitable fast factorization of the DFT may be chosen and used with the diagram shown in
The DST/DCT of type VII is the inverse/transpose version of the DST/DCT of type VI. That is, a DST/DCT of type VI may be used to transform data in the time domain, to transformed data in the frequency domain. A DST/DCT of type VII may then be used to reverse this process by transforming data from the frequency domain back to the time domain. Fast factorizations for type-VII DCTs and DSTs may be obtained by simply reversing the direction of the mapping shown in
As mentioned above, the application of odd-type transforms may have many uses, including the transformation of data in image and video coding processes. In particular, odd-type transforms may be used in image and video compression.
The encoder 90 may further include a quantization unit 94 for quantizing the transformed data. In this context, quantizing involves converting a digital value at one bit-depth (e.g., 12 bits) to a digital value at a lower bit-depth (e.g., 8 bits). The amount of bit-depth reduction is often called a quantization parameter. Quantization allows for further compression of the input data and may also result in small-valued components in the frequency range to be quantized down to a value of zero. This leads to further efficiencies in compression when using statistical lossless coding. The quantized data may then be statistical lossless encoded by the statistical lossless encoding unit 96. Examples of statistical lossless coding include context adaptive variable length coding (CAVLC) and context adaptive binary arithmetic coding (CABAC).
The intermediate sequence is then used as an input to DFT unit 114. The DFT unit 114 may then calculate a DFT for the intermediate sequence using any applicable fast algorithm, such as a fast Fourier transform. In one example, the DFT unit 114 may be further configured to select only the imaginary part of odd numbered output values as the output for a DST of type VI (see equation (8a)). In another example, the DFT unit 114 may be further configured to select only the real part of odd numbered output values as the output for a DST of type VI (see equation (9a)). In either case, an odd-length DFT is used.
As mentioned above, the techniques for calculating an odd-type transform of this disclosure are applicable for application in video coding. One example application is the use of the DST of type VI for the transformation of residual values in an intra-prediction process for use with the high efficiency video coding (HEVC) standard currently under development by the Joint Cooperative Team for Video Coding (JCT-VC). The techniques of this disclosure are also applicable with other video compression techniques, such as those described in the standards defined by MPEG-2, MPEG-4, ITU-T H.263, ITU-T H.264/MPEG-4, Part 10, and Advanced Video Coding (AVC).
In HEVC, a video frame may be partitioned into coding units. A coding unit (CU) generally refers to an image region that serves as a basic unit to which various coding tools are applied for video compression. A CU usually has a luminance component, denoted as Y, and two chroma components, denoted as U and V. Depending on the video sampling format, the size of the U and V components, in terms of number of samples, may be the same as or different from the size of the Y component. A CU is typically square, and may be considered to be similar to a so-called macroblock, e.g., under other video coding standards such as ITU-T H.264. Coding according to some of the presently proposed aspects of the developing HEVC standard will be described in this application for purposes of illustration. However, the techniques described in this disclosure may be useful for other video coding processes, such as those defined according to H.264 or other standard or proprietary video coding processes.
HEVC standardization efforts are based on a model of a video coding device referred to as the HEVC Test Model (HM). The HM presumes several capabilities of video coding devices over devices according to, e.g., ITU-T H.264/AVC. For example, whereas H.264 provides nine intra-prediction encoding modes, HM provides as many as thirty-four intra-prediction encoding modes.
According to the HM, a CU may include one or more prediction units (PUs) and/or one or more transform units (TUs). Syntax data within a bitstream may define a largest coding unit (LCU), which is a 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 a CU does not have a size distinction. Thus, a CU may be split into sub-CUs. In general, references in this disclosure to a CU may refer to a largest coding unit of a picture or a sub-CU of an LCU. An LCU may be split into sub-CUs, and each sub-CU may be further split into sub-CUs. Syntax data for a bitstream may define a maximum number of times an LCU may be split, referred to as CU depth. Accordingly, a bitstream may also define a smallest coding unit (SCU). This disclosure also uses the term “block” or “portion” to refer to any of a CU, PU, or TU. In general, “block” or “portion” may refer to any sub-set of a video frame.
Techniques for the fast computation of odd-type transforms, in accordance with examples of this disclosure, may be applied to video coding in support of any of a variety of multimedia applications, such as over-the-air television broadcasts, cable television transmissions, satellite television transmissions, streaming video transmissions, e.g., via the Internet, encoding of digital video for storage on a data storage medium, decoding of digital video stored on a data storage medium, or other applications. In some examples, the system 10 may be configured to support one-way or two-way video transmission to support applications such as video streaming, video playback, video broadcasting, and/or video telephony.
In the example of
The captured, pre-captured, or computer-generated video may be encoded by the video encoder 20. The encoded video information may be modulated by the modem 22 according to a communication standard, such as a wireless communication protocol, and transmitted to the destination device 14 via the transmitter 24. The modem 22 may include various mixers, filters, amplifiers or other components designed for signal modulation. The transmitter 24 may include circuits designed for transmitting data, including amplifiers, filters, and one or more antennas.
The captured, pre-captured, or computer-generated video that is encoded by the video encoder 20 may also be stored onto a storage medium 34 or a file server 36 for later consumption. The storage medium 34 may include Blu-ray discs, DVDs, CD-ROMs, flash memory, or any other suitable digital storage media for storing encoded video. The encoded video stored on the storage medium 34 may then be accessed by the destination device 14 for decoding and playback.
The file server 36 may be any type of server capable of storing encoded video and transmitting that encoded video to the destination device 14. Example file servers include a web server (e.g., for a website), an FTP server, network attached storage (NAS) devices, a local disk drive, or any other type of device capable of storing encoded video data and transmitting it to a destination device. The transmission of encoded video data from the file server 36 may be a streaming transmission, a download transmission, or a combination of both. The file server 36 may be accessed by the destination device 14 through any standard data connection, including an Internet connection. This may include a wireless channel (e.g., a Wi-Fi connection), a wired connection (e.g., DSL, cable modem, Ethernet, USB, etc.), or a combination of both that is suitable for accessing encoded video data stored on a file server.
The destination device 14, in the example of
The display device 32 may be integrated with, or external to, the destination device 14. In some examples, the destination device 14 may include an integrated display device and also be configured to interface with an external display device. In other examples, the destination device 14 may be a display device. In general, the display device 32 displays the decoded video data to a user, and may comprise any of a variety of display devices such as a liquid crystal display (LCD), a plasma display, an organic light emitting diode (OLED) display, or another type of display device.
In the example of
The video encoder 20 and the video decoder 30 may operate according to a video compression standard, such as the High Efficiency Video Coding (HEVC) standard presently under development, and may conform to the HEVC Test Model (HM). Alternatively, the video encoder 20 and the video decoder 30 may operate according to other proprietary or industry standards, such as the ITU-T H.264 standard, alternatively referred to as MPEG-4, Part 10, Advanced Video Coding (AVC), or extensions of such standards. The techniques of this disclosure, however, are not limited to any particular coding standard. Other examples include MPEG-2 and ITU-T H.263.
Although not shown in
The video encoder 20 and the video decoder 30 each may be implemented as any of a variety of suitable encoder circuitry, such as one or more microprocessors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), discrete logic, software, hardware, firmware or any combinations thereof. When the techniques are implemented partially in software, a device may store instructions for the software in a suitable, non-transitory computer-readable medium and execute the instructions in hardware using one or more processors to perform the techniques of this disclosure. Each of the video encoder 20 and the video decoder 30 may be included in one or more encoders or decoders, either of which may be integrated as part of a combined encoder/decoder (CODEC) in a respective device.
As will be discussed in more detail with reference to
The video encoder 20 may implement any or all of the techniques of this disclosure for the fast computation of odd-type transforms in a video coding process. Likewise, the video decoder 30 may implement any or all of these techniques for the fast computation of odd-type transforms in a video coding process. A video coder, as described in this disclosure, may refer to a video encoder or a video decoder. Similarly, a video coding unit may refer to a video encoder or a video decoder. Likewise, video coding may refer to video encoding or video decoding.
As such, in accordance with one example of this disclosure, a video coder (e.g., video encoder 20 or video decoder 30) may be configured to compute an odd-type discrete sine transform (DST) or discrete cosine transform (DCT) in a video or image coding process. The video coder comprising a coding module configured to receive a sequence of real-valued data on which to perform an odd-type transform, a mapping unit configured to map the sequence of real-valued data to an intermediate sequence, and a transform module configured to apply the intermediate sequence as an input to a discrete Fourier transform (DFT) to produce transformed data according to the odd-type transform. The odd-type transform comprises one of a DST of type V, a DCT of type V, a DST of type VI, a DCT of type VI, a DST of type VII, a DCT of type VII, a DST of type VIII, and a DCT of type VIII.
As shown in
During the encoding process, the video encoder 20 receives a video frame or slice to be coded. The frame or slice may be divided into multiple video blocks, e.g., largest coding units (LCUs). The motion estimation unit 42 and the motion compensation unit 44 perform inter-predictive coding of the received video block relative to one or more blocks in one or more reference frames to provide temporal compression. The intra-prediction module 46 may perform intra-predictive coding of the received video block relative to one or more neighboring blocks in the same frame or slice as the block to be coded to provide spatial compression.
The mode select unit 40 may select one of the coding modes, intra or inter, e.g., based on error (i.e., distortion) results for each mode, and provides the resulting intra- or inter-coded block to the summer 50 to generate residual block data and to the summer 62 to reconstruct the encoded block for use in a reference frame. Some video frames may be designated as I-frames, where all blocks in an I-frame are encoded in an intra-prediction mode. In some cases, the intra-prediction module 46 may perform intra-prediction encoding of a block in a P- or B-frame, e.g., when motion search performed by the motion estimation unit 42 does not result in a sufficient prediction of the block.
The motion estimation unit 42 and the motion compensation unit 44 may be highly integrated, but are illustrated separately for conceptual purposes. Motion estimation is the process of generating motion vectors, which estimate motion for video blocks. A motion vector, for example, may indicate the displacement of a prediction unit in a current frame relative to a reference sample of a reference frame. A reference sample may be a block that is found to closely match the portion of the CU including the PU being coded in terms of pixel difference, which may be determined by sum of absolute difference (SAD), sum of square difference (SSD), or other difference metrics. Motion compensation, performed by the motion compensation unit 44, may involve fetching or generating values for the prediction unit based on the motion vector determined by motion estimation. Again, the motion estimation unit 42 and the motion compensation unit 44 may be functionally integrated, in some examples.
The motion estimation unit 42 calculates a motion vector for a prediction unit of an inter-coded frame by comparing the prediction unit to reference samples of a reference frame stored in the reference frame buffer 64. In some examples, the video encoder 20 may calculate values for sub-integer pixel positions of reference frames stored in the reference frame buffer 64. For example, the video encoder 20 may calculate values of one-quarter pixel positions, one-eighth pixel positions, or other fractional pixel positions of the reference frame. Therefore, the motion estimation unit 42 may perform a motion search relative to the full pixel positions and fractional pixel positions and output a motion vector with fractional pixel precision. The motion estimation unit 42 sends the calculated motion vector to the entropy encoding unit 56 and the motion compensation unit 44. The portion of the reference frame identified by a motion vector may be referred to as a reference sample. The motion compensation unit 44 may calculate a prediction value for a prediction unit of a current CU, e.g., by retrieving the reference sample identified by a motion vector for the PU.
The intra-prediction module 46 may intra-prediction encode the received block, as an alternative to inter-prediction performed by the motion estimation unit 42 and the motion compensation unit 44. The intra-prediction module 46 may encode the received block relative to neighboring, previously coded blocks, e.g., blocks above, above and to the right, above and to the left, or to the left of the current block, assuming a left-to-right, top-to-bottom encoding order for blocks. The intra-prediction module 46 may be configured with a variety of different intra-prediction modes. For example, the intra-prediction module 46 may be configured with a certain number of directional prediction modes, e.g., 33 directional prediction modes, based on the size of the CU being encoded.
The intra-prediction module 46 may select an intra-prediction mode by, for example, calculating error values for various intra-prediction modes and selecting a mode that yields the lowest error value. Directional prediction modes may include functions for combining values of spatially neighboring pixels and applying the combined values to one or more pixel positions in a PU. Once values for all pixel positions in the PU have been calculated, the intra-prediction module 46 may calculate an error value for the prediction mode based on pixel differences between the PU and the received block to be encoded. The intra-prediction module 46 may continue testing intra-prediction modes until an intra-prediction mode that yields an acceptable error value is discovered. The intra-prediction module 46 may then send the PU to the summer 50.
The video encoder 20 forms a residual block by subtracting the prediction data calculated by the motion compensation unit 44 or the intra-prediction module 46 from the original video block being coded. The summer 50 represents the component or components that perform this subtraction operation. The residual block may correspond to a two-dimensional matrix of pixel difference values, where the number of values in the residual block is the same as the number of pixels in the PU corresponding to the residual block. The values in the residual block may correspond to the differences, i.e., error, between values of co-located pixels in the PU and in the original block to be coded. The differences may be chroma or luma differences depending on the type of block that is coded. This residual block may then be transformed by the transform module 52 according to the techniques of this disclosure. That is, the residual block is used as the real-valued input data sequence. Typically, a residual block is of even length, though odd length residual blocks are also possible.
The transform module 52 may form one or more transform units (TUs) from the residual block. The transform module 52 selects a transform from among a plurality of transforms. In some examples, the transform module 52 may select an odd-type transform implemented in accordance with techniques described in this disclosure. The transform module 52 then applies the selected transform or transforms to the TU, producing a video block comprising a two-dimensional array of transform coefficients. In particular, transform module 52 may be configured to apply an odd-type transform in the same manner as the odd-type transform module 110 of
The transform module 52, or another unit of the video encoder, may signal the transform used in the encoded video bitstream for use by a video decoder (e.g., the video decoder 30 in
The transform module 52 may send the resulting transform coefficients to the quantization unit 54. The quantization unit 54 may then quantize the transform coefficients. The entropy encoding unit 56 may then perform a scan of the quantized transform coefficients in the matrix according to a scanning mode. This disclosure describes the entropy encoding unit 56 as performing the scan. However, it should be understood that, in other examples, other processing units, such as the quantization unit 54, could perform the scan.
Once the transform coefficients are scanned into the one-dimensional array, the entropy encoding unit 56 may apply entropy coding such as CAVLC, CABAC, syntax-based context-adaptive binary arithmetic coding (SBAC), or another entropy coding methodology to the coefficients. In addition, the entropy encoding unit 56 may encode motion vector (MV) information and any of a variety of syntax elements useful in decoding the video data at the video decoder 30.
To perform CAVLC, the entropy encoding unit 56 may select a variable length code for a symbol to be transmitted. Codewords in VLC may be constructed such that relatively shorter codes correspond to more likely symbols, while longer codes correspond to less likely symbols. In this way, the use of VLC may achieve a bit savings over, for example, using equal-length codewords for each symbol to be transmitted.
To perform CABAC, the entropy encoding unit 56 may select a context model to apply to a certain context to encode symbols to be transmitted. The context may relate to, for example, whether neighboring values are non-zero or not. The entropy encoding unit 56 may also entropy encode syntax elements, such as a significant coefficient flag and a last coefficient flag produced when performing an adaptive scan. In accordance with the techniques of this disclosure, the entropy encoding unit 56 may select the context model used to encode these syntax elements based on, for example, an intra-prediction direction, a scan position of the coefficient corresponding to the syntax elements, block type, and/or transform type, among other factors used for context model selection.
Following the entropy coding by the entropy encoding unit 56, the resulting encoded video may be transmitted to another device, such as the video decoder 30, or archived for later transmission or retrieval.
The inverse quantization unit 58 and the inverse transform module 60 apply inverse quantization and inverse transformation, respectively, to reconstruct the residual block in the pixel domain, e.g., for later use as a reference block. As one example, the inverse quantization unit 58 may apply an inverse odd-type transform, such as a DCT or DST of type VII. The motion compensation unit 44 may calculate a reference block by adding the residual block to a predictive block of one of the frames of the reference frame buffer 64. The motion compensation unit 44 may also apply one or more interpolation filters to the reconstructed residual block to calculate sub-integer pixel values for use in motion estimation. The summer 62 adds the reconstructed residual block to the motion compensated prediction block produced by the motion compensation unit 44 to produce a reconstructed video block for storage in the reference frame buffer 64. The reconstructed video block may be used by the motion estimation unit 42 and the motion compensation unit 44 as a reference block to inter-code a block in a subsequent video frame.
The entropy decoding unit 70 performs an entropy decoding process on the encoded bitstream to retrieve a one-dimensional array of transform coefficients. The entropy decoding process used depends on the entropy coding used by the video encoder 20 (e.g., CABAC, CAVLC, etc.). The entropy coding process used by the encoder may be signaled in the encoded bitstream or may be a predetermined process.
In some examples, the entropy decoding unit 70 (or the inverse quantization unit 76) may scan the received values using a scan mirroring the scanning mode used by the entropy encoding unit 56 (or the quantization unit 54) of the video encoder 20. Although the scanning of coefficients may be performed in the inverse quantization unit 76, scanning will be described for purposes of illustration as being performed by the entropy decoding unit 70. In addition, although shown as separate functional units for ease of illustration, the structure and functionality of the entropy decoding unit 70, the inverse quantization unit 76, and other units of the video decoder 30 may be highly integrated with one another.
The entropy decoding unit 70 applies the scanning mode to the one-dimensional array of transform coefficients to generate a two-dimensional array of transform coefficients. The two-dimensional array of transform coefficients produced by the entropy decoding unit 70 may still be in quantized form and may generally match the two-dimensional array of transform coefficients scanned by the entropy encoding unit 56 of the video encoder 20.
The inverse quantization unit 76 inverse quantizes, i.e., de-quantizes, the quantized transform coefficients provided in the bitstream and decoded by the entropy decoding unit 70. The inverse quantization process may include a conventional process, e.g., similar to the processes proposed for HEVC or defined by the H.264 decoding standard. The inverse quantization process may include use of a quantization parameter QP calculated by the video encoder 20 for the CU to determine a degree of quantization and, likewise, a degree of inverse quantization that should be applied. The inverse quantization unit 76 may inverse quantize the transform coefficients either before or after the coefficients are converted from a one-dimensional array to a two-dimensional array.
The inverse transform module 58 applies an inverse transform, such as an odd-type inverse transform (e.g., a DST or DCT of type VII). In some examples, the inverse transform module 78 may determine an inverse transform based on signaling from the video encoder 20 as described above, or by inferring the transform from one or more coding characteristics such as block size, coding mode, or the like. In some examples, the inverse transform module 78 may determine a transform to apply to the current block based on a signaled transform at the root node of a quadtree for an LCU including the current block. Alternatively, the transform may be signaledat the root of a TU quadtree for a leaf-node CU in the LCU quadtree.
The motion compensation unit 72 may generate prediction data based on motion vectors received from the entropy decoding unit 70. The intra-prediction module 74 may generate prediction data for a current block of a current frame based on a signaled intra-prediction mode and data from previously decoded blocks of the current frame.
The motion compensation unit 72 produces motion compensated blocks, possibly performing interpolation based on interpolation filters. Identifiers for interpolation filters to be used for motion estimation with sub-pixel precision may be included in the syntax elements. The motion compensation unit 72 may use interpolation filters as used by the video encoder 20 during encoding of the video block to calculate interpolated values for sub-integer pixels of a reference block. The motion compensation unit 72 may determine the interpolation filters used by the video encoder 20 according to received syntax information and use the interpolation filters to produce predictive blocks.
The motion compensation unit 72 and the intra-prediction module 74, in an HEVC example, may use some of the syntax information (e.g., provided by a quadtree) to determine sizes of LCUs used to encode frame(s) of the encoded video sequence. The motion compensation unit 72 and the intra-prediction module 74 may also use syntax information to determine split information that describes how each CU of a frame of the encoded video sequence is split (and likewise, how sub-CUs are split). The syntax information may also include modes indicating how each split is encoded (e.g., intra- or inter-prediction, and for intra-prediction an intra-prediction encoding mode), one or more reference frames (and/or reference lists containing identifiers for the reference frames) for each inter-encoded PU, and other information to decode the encoded video sequence.
The summer 80 combines the residual blocks with the corresponding prediction blocks generated by the motion compensation unit 72 or the intra-prediction module 74 to form decoded blocks. If desired, a deblocking filter may also be applied to filter the decoded blocks in order to remove blockiness artifacts. The decoded video blocks are then stored in the reference frame buffer 82, which provides reference blocks for subsequent motion compensation and also produces decoded video for presentation on a display device (such as the display device 32 of
Next, the video encoder 20 or the video decoder 30 maps the sequence of real-valued data to an intermediate sequence (122). In one example, the sequence of real-valued data has an even number of values and is represented by x(n), wherein an individual value of the sequence of real-valued data is denoted as x(n) with variable n representing an index associated with the individual value of the sequence of real-valued data. The intermediate sequence is denoted by the variable y, wherein an individual value of the sequence is denoted as y(n) with variable n representing an index associated with the individual value of the intermediate sequence. The sequence of real-valued data is mapped to the intermediate sequence using equation (6):
For an example where the sequence of real-valued data has an odd number values, the real-sequence of real-valued data is mapped to the intermediate sequence using equation (7):
After the intermediate sequence is create, the video encoder 20 or the video decoder 30 applies the intermediate sequence as an input to a discrete Fourier transform (DFT) to produce transformed data according to the odd-type transform (124). The odd-type transform may be one of a DST of type V, a DCT of type V, a DST of type VI, a DCT of type VI, a DST of type VII, a DCT of type VII, a DST of type VIII, and a DCT of type VIII. As one example, the odd-type transform is a DST of type VI. In this example, a DST of type VI applied to the sequence of real-valued data may be represented as imaginary values of a DFT of odd size using the intermediate sequence y(n). As such, the DST of type VI may be represented by:
The variable Y refers to a sequence of DFT output values computed by the DFT.
In another example, the odd-type transform is a DCT of type VI. In this example, a DCT of type VI applied to the sequence of real-valued data may be represented as real values of a DFT of odd size using the intermediate sequence y(n). As such, the DCT of type VI may be represented by:
A fast DFT algorithm may be used to compute the odd-type transform using the aforementioned mapping of equations (6) or (7). In one example, the fast algorithm may be a fast Fourier transform (FFT).
In the example of
The following paragraphs show one example of the derivation of the intermediate sequence discussed above. Though the following derivation uses different variables, one skilled in the art would understand how the following techniques may be used to derive the intermediate sequence shown above.
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, a computer-readable medium and executed by a hardware-based processing unit. Computer-readable media may include computer-readable storage media, which corresponds to a tangible medium such as data storage media, or communication media including any medium that facilitates transfer of a computer program from one place to another, e.g., according to a communication protocol. In this manner, computer-readable media generally may correspond to (1) tangible computer-readable storage media which is non-transitory or (2) a communication medium such as a signal or carrier wave. Data storage media may be any available media that can be accessed by one or more computers or one or more processors to retrieve instructions, code and/or data structures for implementation of the techniques described in this disclosure. A computer program product may include a computer-readable medium.
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 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 transient media, but are instead directed to non-transient, 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.
Instructions may be executed by one or more processors, such as one or more digital signal processors (DSPs), general purpose microprocessors, application specific integrated circuits (ASICs), field programmable logic arrays (FPGAs), or other equivalent integrated or discrete logic circuitry. Accordingly, the term “processor,” as used herein may refer to any of the foregoing structure or any other structure suitable for implementation of the techniques described herein. In addition, in some aspects, the functionality described herein may be provided within dedicated hardware and/or software modules configured for encoding and decoding, or incorporated in a combined codec. Also, the techniques could 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 set of ICs (e.g., a chip set). Various components, modules, or units are described in this disclosure to emphasize functional aspects of devices configured to perform the disclosed techniques, but do not necessarily require realization by different hardware units. Rather, as described above, various units may be combined in a codec hardware unit or provided by a collection of interoperative hardware units, including one or more processors as described above, in conjunction with suitable software and/or firmware.
Various examples have been described. These and other examples are within the scope of the following claims.
This application claims the benefit of U.S. Provisional Application No. 61/492,759, filed on Jun. 2, 2011, U.S. Provisional Application No. 61/525,673, filed on Aug. 19, 2011, and U.S. Provisional Application No. 61/533,662, filed on Sep. 12, 2011, the contents of which are hereby incorporated by reference in their entirety.
Number | Date | Country | |
---|---|---|---|
61492759 | Jun 2011 | US | |
61525673 | Aug 2011 | US | |
61533662 | Sep 2011 | US |