The present invention relates to video decoding, and more particularly, to low complexity video decoders.
When an end user is viewing a video program utilizing a home theater system at home, encoded data of the video program is decoded for being displayed on a display panel of the home theater system, and the decoded results of the encoded data can be scaled up or scaled down to meet the size and resolution of the display panel. Typically, a decoding device of the home theater system can decode the encoded data with ease, no matter how complicated the algorithm for decoding the encoded data is, and no matter whether the resolution of the video program is high or not.
It would be very convenient for the end user to own a portable electronic device (e.g. a mobile phone or a personal digital assistant (PDA)) that can be utilized for viewing the same video program anywhere. However, when a research and development (R&D) team of a manufacturer is designing such a portable electronic device, some problems may arise. For example, the decoding capability of the portable electronic device may be insufficient in a situation where the algorithm for decoding the encoded data is too complicated and/or the resolution of the video program is high. In another example, the power consumption may be too high when one or more processing circuits within the portable electronic device operate at the highest operation frequency available. Thus, there is a need for highly efficient and cost effective video decoders, in order to implement the portable electronic device mentioned above.
It is therefore an objective of the claimed invention to provide low complexity video decoders, in order to solve the above-mentioned problems.
It is another objective of the claimed invention to provide low complexity video decoders, in order to reduce the calculation load and the power consumption within a portable electronic device such as that mentioned above.
It is another objective of the claimed invention to provide low complexity video decoders, in order to reduce complexity of decoding operations by making at least a portion of components therein operate in accordance with the resolution of reconstructed frames to be displayed, rather than the resolution of original frames, since the resolution of a display panel of the portable electronic device is typically limited, and is typically lower than the resolution of the original frames. As a result, scaling down the reconstructed frames sometimes can be avoided.
An exemplary embodiment of a low complexity video decoder comprises: a fast variable length decoding (VLD) and inverse quantization module arranged to perform fast VLD and inverse quantization on an input bit stream to generate inverse quantization results; an inverse transform unit arranged to perform inverse transform on the inverse quantization results to generate inverse transform results; and a motion compensation module arranged to perform motion compensation according to the input bit stream and generate associated prediction outputs. The motion compensation module comprises: a temporal prediction unit arranged to perform temporal prediction to generate at least a portion of the prediction outputs; and a spatial prediction unit arranged to perform spatial prediction to generate at least a portion of the prediction outputs. In addition, the low complexity video decoder further comprises: an arithmetic unit arranged to sum up the inverse transform results and the prediction outputs to generate compensated outputs; a reconstructed frame output unit arranged to generate a plurality of reconstructed frames according to the compensated outputs, wherein the spatial prediction unit performs spatial prediction according to a current reconstructed frame of the reconstructed frames; and a frame storage arranged to temporarily store at least one portion of the reconstructed frames, wherein the temporal prediction unit performs temporal prediction according to the at least one portion of the reconstructed frames. Additionally, the temporal prediction unit operates in accordance with a resolution of the reconstructed frames, rather than a resolution of a plurality of original frames represented by the input bit stream, in order to reduce complexity of performing temporal prediction; and the temporal prediction unit further estimates at least a portion of partial information that has been omitted, in order to perform sub-pixel interpolation for use of performing temporal prediction. In particular, the resolution of the reconstructed frames is less than the resolution of the original frames.
An exemplary embodiment of a low complexity video decoder comprises: a fast VLD and inverse quantization module arranged to perform fast VLD and inverse quantization on an input bit stream to generate inverse quantization results; an inverse transform unit arranged to perform inverse transform on the inverse quantization results to generate inverse transform results; and a motion compensation module arranged to perform motion compensation according to the input bit stream and generate associated prediction outputs. The motion compensation module comprises: a temporal prediction unit arranged to perform temporal prediction to generate at least a portion of the prediction outputs; and a spatial prediction unit arranged to perform spatial prediction to generate at least a portion of the prediction outputs. In addition, the low complexity video decoder further comprises: an arithmetic unit arranged to sum up the inverse transform results and the prediction outputs to generate compensated outputs; a reconstructed frame output unit arranged to generate a plurality of reconstructed frames according to the compensated outputs, wherein the spatial prediction unit performs spatial prediction according to a current reconstructed frame of the reconstructed frames; and a frame storage arranged to temporarily store at least one portion of the reconstructed frames, wherein the temporal prediction unit performs temporal prediction according to the at least one portion of the reconstructed frames. Additionally, the spatial prediction unit operates in accordance with a resolution of the reconstructed frames, rather than a resolution of a plurality of original frames represented by the input bit stream, in order to reduce complexity of performing spatial prediction; and the spatial prediction unit further estimates at least a portion of partial information that has been omitted, in order to perform sub-pixel interpolation for use of performing spatial prediction. In particular, the resolution of the reconstructed frames is less than the resolution of the original frames.
An exemplary embodiment of a low complexity video decoder comprises: a fast VLD and inverse quantization module arranged to perform fast VLD and inverse quantization on an input bit stream to generate inverse quantization results; an inverse transform unit arranged to perform inverse transform on the inverse quantization results to generate inverse transform results; and a motion compensation module arranged to perform motion compensation according to the input bit stream and generate associated prediction outputs. The motion compensation module comprises: a temporal prediction unit arranged to perform temporal prediction to generate at least a portion of the prediction outputs; and a spatial prediction unit arranged to perform spatial prediction to generate at least a portion of the prediction outputs. In addition, the low complexity video decoder further comprises: an arithmetic unit arranged to sum up the inverse transform results and the prediction outputs to generate compensated outputs; a reconstructed frame output unit arranged to generate a plurality of reconstructed frames according to the compensated outputs, wherein the spatial prediction unit performs spatial prediction according to a current reconstructed frame of the reconstructed frames; and a frame storage arranged to temporarily store at least one portion of the reconstructed frames, wherein the temporal prediction unit performs temporal prediction according to the at least one portion of the reconstructed frames. Additionally, the inverse transform unit operates in accordance with a resolution of the reconstructed frames, rather than a resolution of a plurality of original frames represented by the input bit stream, in order to reduce complexity of performing the inverse transform; and the inverse transform unit omits a portion of calculations of the inverse transform. In particular, the resolution of the reconstructed frames is less than the resolution of the original frames.
An exemplary embodiment of a low complexity video decoder comprises: a fast VLD and inverse quantization module arranged to perform fast VLD and inverse quantization on an input bit stream to generate inverse quantization results; an inverse transform unit arranged to perform inverse transform on the inverse quantization results to generate inverse transform results; and a motion compensation module arranged to perform motion compensation according to the input bit stream and generate associated prediction outputs. The motion compensation module comprises: a temporal prediction unit arranged to perform temporal prediction to generate at least a portion of the prediction outputs; and a spatial prediction unit arranged to perform spatial prediction to generate at least a portion of the prediction outputs. In addition, the low complexity video decoder further comprises: an arithmetic unit arranged to sum up the inverse transform results and the prediction outputs to generate compensated outputs; a reconstructed frame output unit arranged to generate a plurality of reconstructed frames according to the compensated outputs, wherein the spatial prediction unit performs spatial prediction according to a current reconstructed frame of the reconstructed frames; and a frame storage arranged to temporarily store at least one portion of the reconstructed frames, wherein the temporal prediction unit performs temporal prediction according to the at least one portion of the reconstructed frames. Additionally, the reconstructed frame output unit operates in accordance with a resolution of the reconstructed frames, rather than a resolution of a plurality of original frames represented by the input bit stream, in order to reduce complexity of generating the reconstructed frames; and the reconstructed frame output unit comprises a low complexity de-blocking filter. In particular, the resolution of the reconstructed frames is less than the resolution of the original frames.
An exemplary embodiment of a low complexity video decoder comprises: a fast VLD and inverse quantization module arranged to perform fast VLD and inverse quantization on an input bit stream to generate inverse quantization results; an inverse transform unit arranged to perform inverse transform on the inverse quantization results to generate inverse transform results; and a motion compensation module arranged to perform motion compensation according to the input bit stream and generate associated prediction outputs. The motion compensation module comprises: a temporal prediction unit arranged to perform temporal prediction to generate at least a portion of the prediction outputs; and a spatial prediction unit arranged to perform spatial prediction to generate at least a portion of the prediction outputs. In addition, the low complexity video decoder further comprises: an arithmetic unit arranged to sum up the inverse transform results and the prediction outputs to generate compensated outputs; a reconstructed frame output unit arranged to generate a plurality of reconstructed frames according to the compensated outputs, wherein the spatial prediction unit performs spatial prediction according to a current reconstructed frame of the reconstructed frames; and a frame storage arranged to temporarily store at least one portion of the reconstructed frames, wherein the temporal prediction unit performs temporal prediction according to the at least one portion of the reconstructed frames. Additionally, the fast VLD and inverse quantization module operates in accordance with a resolution of the reconstructed frames, rather than a resolution of a plurality of original frames represented by the input bit stream, in order to reduce complexity of performing fast VLD and inverse quantization; and the fast VLD and inverse quantization module utilizes a lookup table comprising a main table and at least one sub-table during fast VLD, and a probability of utilizing the main table is greater than that of the at least one sub-table. In particular, the resolution of the reconstructed frames is less than the resolution of the original frames.
These and other objectives of the present invention will no doubt become obvious to those of ordinary skill in the art after reading the following detailed description of the preferred embodiment that is illustrated in the various figures and drawings.
Certain terms are used throughout the following description and claims, which refer to particular components. As one skilled in the art will appreciate, electronic equipment manufacturers may refer to a component by different names. This document does not intend to distinguish between components that differ in name but not in function. In the following description and in the claims, the terms “include” and “comprise” are used in an open-ended fashion, and thus should be interpreted to mean “include, but not limited to . . . ”. Also, the term “couple” is intended to mean either an indirect or direct electrical connection. Accordingly, if one device is coupled to another device, that connection may be through a direct electrical connection, or through an indirect electrical connection via other devices and connections.
Please refer to
According to this embodiment, the fast VLD and inverse quantization module 110 is arranged to perform fast VLD and inverse quantization on an input bit stream 108 to generate inverse quantization results 118, and the inverse transform unit 120 is arranged to perform inverse transform on the inverse quantization results 118 to generate inverse transform results 128. In addition, the motion compensation module 130 is arranged to perform motion compensation according to the input bit stream 108 and generate associated prediction outputs 138, where the temporal prediction unit 132 is arranged to perform temporal prediction and the spatial prediction unit 134 is arranged to perform spatial prediction. As shown in
In particular, at least one portion of the low complexity video decoder 100, such as the temporal prediction unit 132, the spatial prediction unit 134, the inverse transform unit 120, the reconstructed frame output unit 150, and/or the fast VLD and inverse quantization module 110, may operate in accordance with the resolution of the reconstructed frames 158, rather than the resolution of the original frames represented by the input bit stream 108, in order to reduce complexity of decoding operations. The reduced resolution frame can be achieved by down sampling the frame, for example, by selecting particular pixels to represent each block of the frame, such as selecting the bottom right pixels of each 2 by 2 pixels. In an embodiment, the temporal prediction unit 132 operates in accordance with the resolution of the reconstructed frames 158, rather than the resolution of the original frames, in order to reduce complexity of temporal prediction. For example, the temporal prediction unit 132 further estimates at least a portion of partial information that has been omitted, in order to perform half pixel or quarter pixel interpolation for use of performing the temporal prediction. In addition, the spatial prediction unit 134 operates in accordance with the resolution of the reconstructed frames 158, rather than the resolution of the original frames, in order to reduce complexity of spatial prediction. For example, the spatial prediction unit 134 further estimates at least a portion of partial information that has been omitted, in order to perform half pixel or quarter pixel interpolation for use of performing the spatial prediction. According to this embodiment, the inverse transform unit 120 operates in accordance with the resolution of the reconstructed frames 158, rather than the resolution of the original frames, in order to reduce complexity of inverse transform. For example, the inverse transform unit 120 omits a portion of calculations of the inverse transform by selecting one of a plurality of predetermined inverse transform functions FIT for use of the inverse transform. In addition, the reconstructed frame output unit 150 operates in accordance with the resolution of the reconstructed frames 158, rather than the resolution of the original frames, in order to reduce complexity of generating the reconstructed frames. For example, the in-loop filter 152 performs in-loop filtering for use of de-blocking. Additionally, the fast VLD and inverse quantization module 110 operates in accordance with the resolution of the reconstructed frames 158, rather than the resolution of the original frames, in order to reduce complexity of performing fast VLD and inverse quantization. More particularly, the fast VLD and inverse quantization module 110 utilizes a lookup table comprising a main table and at least one sub-table (e.g. one or more sub-tables) during decoding, where the probability of utilizing the main table is greater than that of the at least one sub-table due to a predetermined arrangement of the lookup table in a design phase of the low complexity video decoder 100.
According to some variations of this embodiment, at least a portion of the low complexity video decoder 100 can omit partial information being processed by the portion of the low complexity video decoder 100, in order to reduce complexity of decoding the input bit stream 108.
In some embodiments, the low complexity video decoder 100 further stores pixel values of all boundary pixels of a bottom boundary and a right boundary within a current macroblock such as the macroblock 210, and stores pixel values of all boundary pixels of a bottom boundary within an upper macroblock (e.g. the upper adjacent macroblock of the macroblock 210) and pixel values of all boundary pixels of a right boundary within a left macroblock (e.g. the left adjacent macroblock of the macroblock 210), for use of intra prediction. Thus, in addition to the bottom right pixel of every W by W pixels, the low complexity video decoder 100 further keeps the pixel values of additional pixels of some boundaries, such as those of the lightly shaded pixels shown in
In particular, the low complexity video decoder 100 may temporarily discard some pixel values of the boundary pixels for reducing the complicity of operations, and may recover the discarded pixel values later. In this manner, the low complexity video decoder 100 stores the recovered pixel values, rather than the pixel values that have been discarded.
The heavily shaded pixels 312, 314, 316, and 318 are taken as examples of the heavily shaded pixels shown in
In practice, the motion compensation module 130 can utilize a 6-tap filter to perform the recovering operations for up-sampling at least a portion of discarded pixels such as the non-shaded pixels shown in
L(x)=sin c(x)*sin c(x/a0);
where sin c(x)=sin(x)/(π*x) with the notation π representing the ratio of the circumference of a circle to its diameter.
In addition, L(x)=1 when x=0. Please note that in a situation where the absolute value of the value x is greater than or equal to the parameter a0, L(x) is equal to zero.
Please refer to
Referring to
The reduced complexity inverse transform methods proposed above eliminate some calculations by analyzing the output (e.g. The resultant matrix), and if a pixel is to be dropped later, corresponding calculations can be eliminated or corresponding values can be discarded. The reduced complexity inverse transform methods proposed below skip or drop the pixels by analyzing and classifying the input pixels, and please refer to
In practice, the inverse transform unit 120 can utilize a Coded Block Pattern (CBP) descriptor to skip zero blocks. For example, some coefficients such as C5, C6, C7 and C12 in the inverse transform function FIT(13) are zero, and thus can be skipped. In addition, the inverse transform unit 120 may drop some coefficients in a specific inverse transform function of the inverse transform functions {FIT(11), FIT(12), . . . , FIT(16)}, such as the high frequency coefficients C11, C12, . . . , and C15 in some of the inverse transform functions {FIT(11), FIT(12), . . . , FIT(16)}. For example, in the embodiment shown in
Please note that
Please refer to
Referring to
As shown in
In addition, the inverse transform unit 120 can be intentionally arranged to omit at least one portion (e.g. an omitted portion such as that mentioned above) of each of one or more inverse transform functions, no matter whether the omitted portion is overlapped by the dotted portion of the same inverse transform function. For example, in each of the inverse transform functions FIT(32), FIT(33), and FIT(34), the omitted portion (e.g. the portion comprising the coefficients C0, C1, and C2) is overlapped by the dotted portion of the same inverse transform function. In another example, in the inverse transform function FIT(35), the omitted portion (e.g. the portion comprising the coefficients C10, C11, . . . , and C15) is not overlapped by the dotted portion of the same inverse transform function. Please note that the masks applied to the coefficients of the inverse transform functions FIT(31), FIT(32), . . . , and FIT(35) represent different kinds of low pass filtering operations. Similar descriptions are not repeated for this embodiment.
In this embodiment, it is suggested that the fast VLD and inverse quantization module 110 shown in
As shown in
In addition, the non-shaded circles may represent discarded pixel values, or represent non-existing adjustment values or non-existing adjusted results, where the non-existing adjustment values and the non-existing adjusted results are merely illustrated for better comprehension. For example, the non-shaded circles in the block representative corresponding to the operation labeled “Intra IT” may represent the non-shaded pixels of the bottom right block of the size of 4 by 4 pixels within the macroblock 210, and the non-shaded circles in the leftmost block representative corresponding to the operation labeled “Inter IT” may represent the non-shaded pixels of another block of the size of 4 by 4 pixels within the macroblock 210. In another example, the non-shaded circles in the block representative corresponding to the input information labeled “IP” may represent the non-existing adjustment values mentioned above, and the non-shaded circles in the upper right block representative that corresponds to the output information labeled “Output” may represent the non-existing adjusted results. This is for illustrative purposes only, and is not meant to be a limitation of the present invention. According to variations of this embodiment, the adjustment values and/or the adjusted results may exist.
As a result of utilizing the calculation scheme shown in
According to this embodiment, with the aid of the macroblock edge information storage 170, the reconstructed frame output unit 150 can provide the spatial prediction unit 134 with all the macroblock edge information required since the discarded pixel values, such as the pixel values of the lightly shaded pixels 323, 325, and 327, can be recovered as disclosed above. As shown in
In a situation where a codeword length of a codeword is within a predetermined bit size, such as a size of 9 bits, the fast VLD and inverse quantization module 110 utilizes the main table 1110 to store the associated information of the codeword. As a result, the main table 1110 is utilized for table lookup when the codeword length of a codeword is within the predetermined bit size. In a situation where a codeword length of a codeword exceeds the predetermined bit size, the fast VLD and inverse quantization module 110 utilizes the aforementioned at least one sub-table, such as the sub-tables 1121 and 1122, to store the associated information of the codeword. As a result, the sub-tables 1121 and 1122 are utilized for table lookup when the codeword length of a codeword exceeds the predetermined bit size. As the probability of utilizing the main table 1110 is greater than that of any of the sub-tables 1121 and 1122, most table lookup operations are performed according to the main table 1110, causing high efficiency of the table lookup operations. Therefore, the speed of the fast VLD of this embodiment is indeed much faster than that of the related art VLD, causing high performance of the fast VLD and inverse quantization module 110.
In particular, the VLD operations and the inverse quantization operations can be integrated into merged operations such as those mentioned above. Thus, the fast VLD and inverse quantization module 110 performs the fast VLD and inverse quantization by performing the merged operations that are merged from both the VLD operations and the inverse quantization operations, causing high performance of the fast VLD and inverse quantization module 110.
Please note that the related art Huffman decoding scheme is not so efficient. According to the enhanced decoding scheme of this embodiment, by selecting only a portion of the lookup table according to a codeword length of a codeword, the table lookup corresponding to the codeword in this embodiment is mush faster than the table lookup in the related art.
In this embodiment, the in-loop filter 152 performs the in-loop filtering by adjusting a value of existing pixel values (e.g. the pixel values L1 and R2) that are regarded as down sampled values, rather than discarded pixel values (e.g. the pixel values L2 and R1), according to a difference between two of the existing pixel values (e.g. the difference (R2−L1) between the two pixel values R2 and L1), in order to generate a de-blocking filtered value such as an in-loop filtered value (e.g. any of the values L1′ and R2′). For example, the calculations for generating the in-loop filtered value L1′ and R2′ are illustrated in
((R2−L1+2)>>2)=(R2−L1+2)/(2̂2)=(R2−L1+2)/4; and
(ΔL>>1)=ΔL/(2̂1)=ΔL/2.
In addition, the clip function Clip(−C, C, x) represents a hard limiting operation causing the hard limited result of x to be within the range of [−C, C], and ΔL and ΔR can be respectively expressed as follows:
ΔL=Clip(−C,C,(R2−L1+2)>>2)=Clip(−C,C,(R2−L1+2)/4); and
ΔR=ΔL>>1=ΔL/2=Clip(−C,C,(R2−L1+2)/4)/2.
As a result, the in-loop filtered value L1′ and R2′ can be respectively written as follows:
L1′=Clip(0,255,(L1+ΔL))=Clip(0,255,(L1+Clip(−C,C,(R2−L1+2)/4); and
R2′=Clip(0,255,(R2+ΔR))=Clip(0,255,(R2+Clip(−C,C,(R2−L1+2)/4)/2)).
In another embodiment, the low complexity de-blocking filter such as the in-loop filter 152 may perform low complexity de-blocking according to the quantization step size (e.g. the so-called QP value), the macroblock (MB) type, and the edge strength.
It is an advantage of the present invention that the low complexity video decoder of each embodiment/variations disclosed above can be applied to various kinds of digital video applications, where each of the respective components within the low complexity video decoder does not introduce a heavy workload and does not consume much electrical power. Therefore, the cost can be reduced in contrast to the related art, causing great flexibility of implementing digital video systems such as those using the MPEG-2 technology.
Those skilled in the art will readily observe that numerous modifications and alterations of the device and method may be made while retaining the teachings of the invention.