The present invention contains subject matter related to Japanese Patent Application JP 2007-131866 filed in the Japanese Patent Office on May 17, 2007, the entire contents of which are incorporated herein by reference.
1. Field of the Invention
The present invention relates to an information processing device and method, and more specifically to an information processing device and method which makes it possible to perform a wavelet transform process and an encoding process efficiently to achieve a reduction in load.
2. Description of the Related Art
As a representative image compression method according to the related art, there is the JPEG (Joint Photographic Experts Group) standardized by the ISO (International Standards Organization). The JPEG uses a discrete cosine transform (DCT), and is known to provide good-quality encoded image and decoded image when relatively high bits are assigned.
In recent years, numerous studies have been made on methods whereby an image is decomposed into a plurality of frequency bands using a filter called a filter bank which is made up of a combination of a high-pass filter and a low-pass filter, and encoding is applied per frequency band. Of those, wavelet transform encoding is regarded as a new promising technique to supersede DCT because the technique is free from block distortion which often becomes a problem in the case of a DCT transform.
The JPEG 2000, of which international standardization was completed in January 2001, adopts a method in which high-efficiency entropy encoding (bit modeling and arithmetic encoding on a bitplane-by-bitplane basis) is combined with the above-mentioned wavelet transform. The JPEG 2000 achieves a significant improvement in encoding efficiency over the JPEG.
A wavelet transform process (see, for example, Japanese Unexamined Patent Application Publication No. 10-283342) is basically performed by inputting image data, and hierarchically decomposing low-frequency components while applying filtering in the horizontal direction and in the vertical direction.
An inverse wavelet transform process is performed to transform coefficient data (frequency components), into which the image data is transformed by the above wavelet transform process, back into the original image data. The inverse wavelet transform process applies a synthesis filtering process to high-frequency components and low-frequency components, starting from the highest decomposition level down to the lowest decomposition level, thereby finally reconstructing an image.
Encoding systems using such a wavelet transform/inverse wavelet transform are frequently used in systems that perform transmission of image data, such as a teleconferencing system or video game system. The following flow of processes is commonly employed in these systems. That is, on the transmitting side, image data is wavelet transformed, and the obtained coefficient data is entropy encoded and transmitted to the receiving side as encoded data. On the receiving side, the acquired encoded data is entropy decoded, and the obtained coefficient data is inverse wavelet transformed to reconstruct the original image data.
In the case of such an image transmission system, it is frequency desired to transmit image data with low delay. Hence, a reduction in delay time is required with respect to individual processes such as the wavelet transform process, entropy encoding, inverse wavelet transform process, and entropy decoding process.
Incidentally, there are software encoders in which an encoder that performs a wavelet transform process and an entropy encoding process is realized by a software program, and software decoders in which a decoder that performs an entropy decoding process and an inverse wavelet transform process is realized by a software program.
In the case of such a software encoder or software decoder, its software program is executed on an information processing device such as a personal computer, thus realizing its function as an encoder or decoder.
However, it is commonly the case that a variety of processes are included in an encoder, and the number of these processes is larger than the number of CPUs (Central Processing Units) that execute a software program. That is, in the case of a software encoder, a single CPU executes a variety of processes. In other words, a single arithmetic processing section is shared among a plurality of processes.
Therefore, unless the individual processes for realizing the encoder function are executed in an appropriate manner to ensure efficient performance of these processes, the CPU usage efficiency may decrease, or the memory capacity required for the processes may increase, resulting in an increase in load. An increase in load may also lead to an increase in cost or delay time.
It is thus desirable to efficiently execute a wavelet transform process and an encoding process to thereby reduce the load placed on hardware.
According to an embodiment of the present invention, there is provided an information processing device including: analysis filtering means for applying to image data an analysis filtering process of decomposing frequency components of the image data into each frequency band by lifting operations; encoding means for performing an encoding process of encoding the frequency components decomposed into each frequency band by the analysis filtering means; and control means for controlling execution of the encoding process by the encoding means with respect to each of the frequency components, so that the encoding process with respect to each of the frequency components is executed during a period after the analysis filtering process is finished with respect to a plurality of lines of the image data that are inputted, until a plurality of lines of the next image data are inputted.
The control means may execute the encoding process with respect to each of the frequency components during a period after the analysis filtering process is finished with respect to two lines of the image data that are inputted, until two lines of the next image data are inputted.
The control means may control the encoding process of the encoding means so that, of the respective frequency components decomposed into each frequency band by the analysis filtering means, lower frequency components and, within the same frequency band, frequency components that are generated earlier, are encoded earlier.
The control means may control the encoding process by the encoding means so as to encode frequency components generated earlier than the lowest frequency components generated last by the lifting operations.
The information processing device may further include encoded data holding means for holding encoded data obtained by encoding the frequency components by the encoding means, and the control means may cause encoding to be applied earlier than generation of the lowest frequency components by the lifting operations, to frequency components corresponding to the lowest frequency components and higher than the lowest frequency components.
The control means may cause the encoded data held in the encoded data holding means to be outputted in a predetermined order, after the lowest frequency components are generated, encoded, and outputted.
The control means may control execution of the analysis filtering process by the analysis filtering means with respect to each of the lifting operations so as to execute the lifting operations that can each be executed every time a plurality of lines of the image data are inputted.
The control means may control execution of the analysis filtering process by the analysis filtering means with respect to each of the lifting operations so as to execute the lifting operations that can each be executed every time two lines of the image data are inputted.
Of the lifting operations in the analysis filtering process, lifting operations that generate higher frequency components may be executed earlier.
According to an embodiment of the present invention, there is provided an information processing method including the steps of: applying to image data an analysis filtering process of decomposing frequency components of the image data into each frequency band by lifting operations; performing an encoding process of encoding the frequency components decomposed into each frequency band; and controlling execution of the encoding process with respect to each of the frequency components, so that the encoding process for each of the frequency components is executed during a period after the analysis filtering process is finished with respect to a plurality of lines of the image data that are inputted, until a plurality of lines of the next image data are inputted.
According to the present invention, a wavelet transform process and an encoding process can be performed. In particular, a wavelet transform process and an encoding process can be performed with improved efficiency, thereby making it possible to reduce the load placed on hardware.
Hereinbelow, an embodiment of the present invention will be described. First, a description will be given of the configuration and operation of an encoding/decoding system using a wavelet transform and an inverse wavelet transform employed in the present invention.
The wavelet transform section 11 applies to image data inputted to the encoding section 10 a wavelet transform process of separating the frequency components of the image data into their frequency bands. Although described later in detail, the wavelet transform section 11 separates frequency components into low- and high-frequency components by an analysis filtering process. Further, the wavelet transform section 11 repeats the analysis filtering process recursively with respect to the obtained low-frequency components, thus hierarchically decomposing the frequency components into frequency bands. It should be noted that in the following description, these frequency components are refereed to as wavelet coefficients, wavelet coefficient data, coefficient data, or coefficients. Also, in the following description, each hierarchical level into which frequency components are decomposed is referred to as decomposition level.
When repeating the analysis filtering process, the wavelet transform section 11 causes the intermediate calculation buffer section 12 to hold the coefficient data or image data to be used for the next analysis filtering process as intermediate calculation data. That is, the wavelet transform section 11 reads intermediate calculation data (image data or coefficient data) held in the intermediate calculation buffer section 12, and uses the intermediate calculation data to perform a wavelet transform process on externally inputted image data.
The wavelet transform section 11 writes the high-frequency components (coefficient data) obtained at each decomposition level, and the low-frequency components (coefficient data) at a predetermined final decomposition level (highest level) into the coefficient reordering buffer section 13.
The coefficient reordering section 14 reads the coefficient data written into the coefficient reordering buffer section 13 in a predetermined order, and supplies the read coefficient data to the entropy encoding section 15. Although will be described later in detail, the order in which pieces of coefficient data are generated in the wavelet transform process differs from the order of their use in the inverse wavelet transform process. Accordingly, the coefficient reordering section 14 reads pieces of coefficient data from the coefficient reordering buffer section 13 in the order of their use in the inverse wavelet transform process, thereby reordering the pieces of coefficient data.
The entropy encoding section 15 quantizes the supplied coefficient data by a predetermined method, for example, in accordance with a predetermined entropy encoding scheme such as Huffman encoding or arithmetic encoding. That is, the entropy encoding section 15 encodes pieces of coefficient data in the order of their use in the inverse wavelet transform process. The entropy encoding section 15 outputs the generated encoded data to the external of the encoding section 10.
When encoded data is inputted, the entropy decoding section 21 performs entropy decoding on the inputted encoded data by a method corresponding to the method used in the entropy encoding section 15 shown in
That is, with respect to the frequency components hierarchically decomposed by the wavelet transform section 11, the inverse wavelet transform section 23 performs a synthesis filtering process of synthesizing low- and high-frequency components in order from the highest decomposition level, and progressively lowers the decomposition level for frequency components by one, thus finally reconstructing image data of the baseband. The inverse wavelet transform section 23 outputs the generated image data to the external of the encoding section 20.
Next, a description will be given of a wavelet transform process employed in a system using the encoding section 10 and the decoding section 20 as described above. As is schematically shown in
Analysis filters include a horizontal analysis filter that applies an analysis filtering process on image data in the horizontal direction of the screen, and a vertical analysis filter that applies an analysis filtering process on image data in the vertical direction of the screen. By performing an analysis filtering process once in each of the directions, image data is decomposed into four frequency bands (subbands). The wavelet transform section 11 recursively repeats the above-described analysis filtering processes in the horizontal direction and in the vertical direction with respect to low spatial frequency bands of the analysis filtering results in both the horizontal and vertical directions (that is, the wavelet transform section 11 applies hierarchical decomposition).
In
In the example shown in
The reason why transforms and decompositions are iterated with respect to low-frequency components is because, as shown in
It should be noted that in the following description, of the four subbands generated by an analysis filtering process, the subband “LL”, which is a subband with low-frequency components with respect to both the horizontal direction and the vertical direction and on which an analysis filtering process is performed again, is referred to as a low-frequency subband, and the other subbands “LH”, “HL”, and “HH” on which no further analysis filtering process is performed are each referred to as a high-frequency subband.
While it is possible to perform the above-mentioned wavelet transform process at once with respect to the entire picture, it is also possible to split one picture of image data in several lines, and apply a wavelet transform process to each of the several lines of image data independently from each other. Since the amount of image data to be processed in a single wavelet transform process is smaller in the latter case than in the former case, the timing of starting the output of the results of a wavelet transform process can be made earlier. That is, a load or delay time due to a wavelet transform process can be reduced.
It should be noted that the number of lines constituting the processing unit of a wavelet transform process is based on the number of lines required for obtaining one line of coefficient data of the highest-level subband, at a predetermined decomposition level of a wavelet transform process.
Since data is decomposed into four parts by an analysis filtering process, as shown in
A collection of pieces of baseband pixel data required for generating one line of coefficient data of the low-frequency subband “LL” of the highest level, or a collection of pieces of coefficient data obtained from the image data is referred to as precinct (or line block).
It should be noted that as shown in
A wavelet transform process and an inverse wavelet transform process are basically performed with this precinct, rather than the entire picture, as the processing unit. That is, one picture of image data is decomposed into a plurality of precincts each made up of a plurality of lines, and processing is executed in a plurality of times on a precinct by precinct basis. Hence, basically, a wavelet transform process and an inverse wavelet transform process are completed on a precinct by precinct basis. For example, when the wavelet transform process is performed with respect to one precinct of baseband image data, a set of pieces of coefficient data whose lowest-frequency component (coefficient data of the highest decomposition level) is made up of at least one line and which are hierarchically decomposed into individual frequency bands is obtained. When the inverse wavelet transform process is performed on the set of pieces of coefficient data, the original one precinct of baseband image data is obtained.
By performing the wavelet transform process and the inverse wavelet transform process per precinct that is a finer unit than a picture in this way, the amount (accumulation amount) of image data or coefficient data to be accumulated for performing a wavelet transform process or an inverse wavelet transform process can be reduced. That is, the transformed coefficient data or image data can be outputted at an earlier timing, thereby making it possible to reduce a load or delay time due to a wavelet transform process or an inverse wavelet transform process.
While it may be also possible to split each line of image data into a plurality of blocks and perform a wavelet transform process or an inverse wavelet transform process by using each of these blocks as the processing unit. In that case, however, control must be performed in even finer units than required by the horizontal synchronization timing. Thus, as compared with a case where a precinct is used as the processing unit, the control may become high-speed and complicated, resulting in an increase in load. Further, the smallest number of lines constituting a block is restricted in accordance with the decomposition level as in the case of a precinct. Since one picture of image data is supplied on a line by line basis in order from the top line on the screen, in the case where a block is used as the processing unit as well, it is necessary to accumulate substantially the same amount of image data or coefficient data as that required in the case where a precinct is used as the processing unit. Therefore, there is virtually no difference in terms of the delay time of a wavelet transform process or an inverse wavelet transform process between the two cases.
It should be noted that the number of lines constituting one precinct may not be the same among individual precincts.
For a wavelet transform, for example, an analysis filter such as a 5×3 filter or 9×7 filter is used. A method using a 5×3 filter is also adopted in the JPEG 2000 standard, and proves advantageous in that a wavelet transform can be performed with a small number of filter taps.
As represented by Equation (1) and Equation (2) below, the impulse response (Z-transform representation) of a 5×3 filter is made up of a low-pass filter H0 (x) and a high-pass filter H1 (z). It is to be appreciated that H0 (x) is a five-tap filter, and H1 (z) is a three-tap filter.
H
0(z)=(−1+2z−1+6z−2+2z−3−z4)/8 (1)
H
1(z)=(−1+2z−1−z−2)/2 (2)
According to Equation (1) and Equation (2) above, coefficients of low-frequency and high-frequency components can be directly calculated. The most common computing method employed for such an analysis filtering process using a filter is a method called convolution. This convolution is the most basic means for realizing a digital filter, and involves multiplying the tap coefficients of a filter by the actual input data. However, since this convolution causes an increase in calculation load in accordance with the tap length, there is a method of performing computation of a filtering process by using the lifting technique described in a dissertation “W. Swelden, “The lifting scheme: A custom-design construction of Biorthogonal wavelets.”, Appl. Comput. Harmon. Anal., vol 3, no. 2, pp. 186-200, 1996)”.
In
Although described later in detail, as shown in
Further, in a case where computation of a filtering process is performed by using the lifting technique, as shown in
Further, in the case of the precinct at the top of a picture, the number of lines differs between baseband image data prior to the wavelet transform and baseband image data obtained after the inverse wavelet transform. Therefore, as shown in
Next, the lifting technique will be described.
In
As the first stage, high-frequency component coefficients di1 are generated from the input pixel row by Equation (3) below.
d
i
1
=d
i
0−½(si0+si+10) (3)
Next, as the second stage, by using the thus generated high-frequency component coefficients, and odd-numbered pixels of an input image, low-frequency component coefficients si1 are generated by Equation (4) below.
s
i
1
=s
i
0+¼(di−11+di1) (4)
On the analysis filter side, the pixel data of an input image is decomposed into low-frequency components and high-frequency components through a filtering process in this way.
Next, referring to
As the first stage, in accordance with Equation (5) below, even-numbered (starting at 0) coefficients si0 are generated from the input coefficients of low-frequency and high-frequency components.
s
i
0
=s
i
1−¼(di−11di1) (5)
Next, as the second stage, in accordance with Equation (6) below, odd-numbered coefficients di0 are generated from the even-numbered coefficient si0 generated in the first stage described above, and input high-frequency component coefficients di0.
d
i
0
=d
i
1+½(si0+si+10) (6)
On the synthesis filter side, coefficients of the low-frequency and high-frequency components are synthesized by the filtering process in this way to perform an inverse wavelet transform.
More specifically, circles and squares in
On the left side of a vertical dotted line located at the center of
In
Further, in
It should be noted that in
A more specific description will be given in this regard. On the left side of the vertical dotted line at the center of
Next, the wavelet transform section 11 performs an analysis filtering process (lifting operation) at decomposition level 2 on the intermediate calculation data held in the intermediate calculation buffer section 12, as shown in the fourth to sixth rows from the left on the left side of the vertical dotted line at the center of
The wavelet transform section 11 performs an analysis filtering process (lifting operation) at decomposition level 2 on coefficient data shown in the fourth row from the left, generating high-frequency components at decomposition level 2 shown in the fifth row from the left and low-frequency components at decomposition level 2 shown in the sixth row from the left. The high-frequency components at decomposition level 2 shown in the fifth row from the left are not subjected to any further analysis filtering process, and are supplied to the coefficient reordering buffer section 13 and held therein. The low-frequency components at decomposition level 2 shown in the sixth row from the left are supplied as intermediate calculation data to the intermediate calculation buffer section 12 and held therein to perform an analysis filtering process again.
Next, the wavelet transform section 11 performs an analysis filtering process (lifting operation) at decomposition level 3 on the intermediate calculation data held in the intermediate calculation buffer section 12, as shown in the seventh to ninth rows from the left on the left side of the vertical dotted line at the center of
The wavelet transform section 11 performs an analysis filtering process (lifting operation) at decomposition level 3 on coefficient data shown in the seventh row from the left, generating high-frequency components at decomposition level 3 shown in the eighth row from the left and low-frequency components at decomposition level 3 shown in the ninth row from the left. The decomposition level 3 is set in advance as the highest level beyond which no further filtering process is performed. Accordingly, both the high-frequency components at decomposition level 3 shown in the eighth row from the left, and the low-frequency components at decomposition level 3 shown in the ninth row from the left are supplied to the coefficient reordering buffer section 13 and held therein.
That is, on the left side of the vertical dotted line at the center of the
As described above, the wavelet transform section 11 performs a lifting operation through a wavelet transform process in order from decomposition level 1 to decomposition 3, thus generating coefficient data of individual decomposition levels in order from higher to lower frequencies. However, although described later in detail, since image data is inputted per one line in actuality, the wavelet transform section 11 can perform a lifting operation every time two lines of image data are inputted. That is, in some cases, inputted image data or coefficient data held in the coefficient reordering buffer section 13 is used for the next lifting operation. Accordingly, such image data is used not only for a lifting operation at the time of its input but is also held in the intermediate calculation buffer section 12 as intermediate calculation data and used for a lifting operation performed when the next line is inputted. Likewise, coefficient data is not only held in the coefficient reordering buffer section 13 but is also held in the intermediate calculation buffer section 12 as intermediate calculation data and used for a lifting operation performed later.
Through the above-described lifting operation, the wavelet transform section 11 generates pieces of coefficient data (black circle () and black square (▪)) obtained as a result of the lifting operation, in the order of the numbers attached to the left of the respective pieces of coefficient data.
On the other hand, on the right side of the vertical dotted line at the center of
On the right side of the vertical dotted line at the center of
The inverse wavelet transform section 23 performs a lifting operation (synthesis filtering process at decomposition level 2) again with respect to the low-frequency components at decomposition level 2 shown in the second and third rows from the left, and high-frequency components at decomposition level 2 that are newly supplied (the fourth to sixth rows from the left). Each square indicated by the pattern of diagonal lines sloping upward from left to right in the fourth row from the left represents the same coefficient data as the square of the same column as its own in the second row from the left or the circle in the third row from the left. Further, each black circle () in the fourth row from the left represents the same coefficient data as the black circle () of the same column as its own in the fifth row from the left on the left side of the vertical dotted line at the center of
The inverse wavelet transform section 23 performs a synthesis filtering process (lifting operation) at decomposition level 2 of synthesizing low-frequency components and high-frequency components at decomposition level 2 shown in the fourth row from the left on the right side of the vertical dotted line at the center of
The inverse wavelet transform section 23 performs a lifting operation (synthesis filtering process at decomposition level 1) again with respect to the low-frequency components at decomposition level 1 shown in the fifth and sixth rows from the left, and high-frequency components at decomposition level 1 that are newly supplied (the seventh to ninth rows from the left). Each square indicated by the pattern of diagonal lines sloping upward from left to right in the seventh row from the left represents the same coefficient data as the square in the fifth row from the left or the circle in the sixth row from the left that is in the same column as the square itself. Further, each of black circles () in the seventh row from the left represents the same coefficient data as the black circle () of the same column as its own in the seventh row from the left on the left side of the vertical dotted line at the center of
The inverse wavelet transform section 23 performs a synthesis filtering process (lifting operation) at decomposition level 1 of synthesizing low-frequency components and high-frequency components at decomposition level 1 shown in the seventh row from the left on the right side of the vertical dotted line at the center of
From the relationship between the lifting operations in the analysis filtering process and synthesis filtering process as described above, precincts are partitioned as indicated by a curved line 51 and a curved line 52. That is, at the time of a wavelet transform, image data of the first precinct that is the precinct at the top of a picture requires 15 lines from line number 0 to line number 14, and image data of the second precinct that is the second precinct from the top of the picture requires 8 lines from line number 15 to line number 22. In actuality, as shown in
Further, at the time of an inverse wavelet transform, 1 line of image data of line number 0 is generated from coefficient data of the first precinct, and 8 lines of image data from line number 1 to line number 8 are generated from coefficient data of the second precinct. In actuality, as shown in
On the right side of the vertical dotted line at the center of
That is, the order in which pieces of coefficient data are generated in the analysis filter, and the order in which pieces of coefficient data are used in the synthesis filter are different from each other. Accordingly, as indicated by hollow arrows at the center of
The coefficient reordering section 14 reads pieces of coefficient data held in the coefficient reordering buffer section 13, in the order of their use in the synthesis filtering process to thereby reorder the pieces of coefficient data. That is, the entropy encoding section 15 encodes the pieces of coefficient data in the order of their use in the synthesis filtering process.
The encoding section 10 and the decoding section 20 execute their respective processes in parallel with each other, as schematically shown in
By performing processes in parallel in this way, the delay time from the input to the output can be set to the sum of the time corresponding to 15 lines and the processing time of each process. In contrast, in a case where a wavelet transform is performed with respect to, for example, the whole of one picture, a delay time corresponding to one picture or more occurs. Accordingly, by performing the respective processes on a precinct by precinct basis, and also executing the respective processes in parallel with each other as shown in
However, in the case of a software encoder or software decoder, the software encoder or software decoder is realized by a software program being executed in a personal computer as shown in
In
The CPU 101, the ROM 102, and the RAM 103 are connected to each other via the bus 104. An input/output interface 101 is also connected to the bus 104.
Connected to the input/output interface 110 is an input section 111 formed by a keyboard or mouse, an output section 112 formed by a display such as a CRT (Cathode Ray Tube) or LCD (Liquid Crystal Display), or a speaker or the like, the storage section 113 formed by a hard disk or the like, and a communication section 114 formed by a modem or the like. The communication section 114 performs a communication process via a network represented by the Internet, for example.
A drive 115 is also connected to the input/output interface 110 as required. A removable medium 121 such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory are mounted in the drive 115 as appropriate, and a computer program read from the removable medium 121 is installed into the storage section 113 as required.
Although not shown, a cache memory is provided within the CPU 101. Although this cache memory operates faster than the RAM 103, its capacity is smaller than that of the RAM 103. That is, the amount of data that can be stored into this cache memory at a time is limited. Accordingly, the CPU 101 stores into this cache memory data with a high usage frequency or data that will be used in the near future, and holds data with a low usage frequency, data that will not be used for the time being, or the like in the RAM 103.
As shown in
That is, as shown in
However, in a case where a wavelet transform process is simply applied with respect to the whole of one precinct, it is necessary to accumulate one precinct of input image data, resulting in an increase in required memory capacity. This may lead to not only an increase in circuit scale or cost but also an increase in load or delay time.
Accordingly, by directing attention to the fact that the wavelet transform section 11 performs a wavelet transform process by using a lifting operation as described above, a wavelet transform process is applied to one precinct of image data in an efficient manner to thereby reduce the accumulation amount of this image data.
In
Subsequently, when image data of line numbers 19 and 20 are inputted, the wavelet transform section 11 performs a lifting operation represented by the portion enclosed by the curved line 163, thus generating coefficient data that is subjected to a synthesis filtering process in the twenty-fourth turn. When image data of line numbers 21 and 22 are inputted, the wavelet transform section 11 performs a lifting operation represented by the portion enclosed by the curved line 164, so the wavelet transform section 11 generates coefficient data that is subjected to a synthesis filtering process in the twenty-fifth turn, further generates coefficient data that is subjected to a synthesis filtering process in the eighteenth turn, and lastly generates coefficient data that is subjected to a synthesis filtering process in the sixth turn and coefficient data that is subjected to a synthesis filtering process in the fifth turn.
In this way, a lifting operation that can be executed every time two lines of image data are inputted is performed sequentially, which makes it unnecessary for the wavelet transform section 11 to accumulate one precinct of image data. This not only makes it possible to reduce the required memory capacity to achieve a reduction in circuit scale or manufacturing cost but also makes it possible to reduce the load or delay time due to a wavelet transform process.
It should be noted that a second precinct in the decoding section 20 corresponding to the second precinct in the encoding section 10 mentioned above is represented by the portion enclosed by a curved line 152 in
Pieces of coefficient data outputted from the wavelet transform section 11, which are indicated by black circles or black squares, are supplied to the entropy encoding section 15 in the order of their numbers by the coefficient reordering section 14. The entropy encoding section 15 applies entropy encoding to the respective pieces of coefficient data in the order in which they are supplied, thereby obtaining encoded data of each coefficient data. That is, the entropy encoding section 15 cannot start entropy encoding with respect to coefficient data of the second precinct in the decoding section 20 until the coefficient data that is subjected to a synthesis filtering process in the fifth turn and the coefficient data that is subjected to a synthesis filtering process in the sixth turn, which are enclosed by a dotted ellipse in
Accordingly, the CPU 101 causes respective processes of the encoding section 10 to proceed in the manner as shown in
The CPU 101 performs a lifting operation (analysis filtering process) that can be executed every time two lines of image data are inputted, with respect to the second precinct in the encoding section 10 (DWT(Lev1) to DWT(Lev3)).
In
In each lifting operation, when the CPU 101 generates coefficient data to been encoded, the CPU 101 causes the coefficient reordering buffer section 13 to sequentially hold the coefficient data. The coefficient reordering buffer section 13 is formed by, for example, a cache memory within the CPU 101 or the RAM 103.
Then, upon generating coefficient data that is subjected to a synthesis filtering process in the fifth turn and coefficient data that is subjected to a synthesis filtering process in the sixth turn, the CPU 101 starts entropy encoding with respect to coefficient data of the second precinct in the decoding section 20. It should be noted that since the last generated pieces of coefficient data at this time, that is, the coefficient data that is subjected to a synthesis filtering process in the fifth turn and the coefficient data that is subjected to a synthesis filtering process in the sixth turn, are small in data size and are to be used immediately, an entropy encoding process is started with these pieces of coefficient data held in the CPU 101 as they are, without being held in the coefficient reordering buffer section 13.
In this way, by taking advantage of the feature of coefficient reordering that the last generated coefficient data is encoded first, the holding of the coefficient data subjected to a synthesis filtering process in the fifth turn and coefficient data subjected to a synthesis filtering process in the sixth turn into the coefficient reordering buffer section 13 is omitted, thereby making it possible to reduce the memory capacity required of the coefficient reordering buffer section 13. This makes it possible not only to reduce the circuit scale and manufacturing cost but also to reduce the number of times data is written to and read from the coefficient reordering buffer section 13, thereby achieving a reduction in the load or delay time due to a wavelet transform process and encoding.
After starting entropy encoding, the CPU 101 encodes pieces of coefficient data that are subjected to a synthesis filtering process in the fifth to twelfth turns, in the order of their numbers one line by one line, and sequentially outputs the obtained pieces of encoded data.
In
While
As described above, each of the squares (excluding the coefficient reordering buffer section 13) shown in
In the case of the process flow as shown in
That is, as shown in
Therefore, for example, the CPU 101 cannot perform a wavelet transform process (DWT) in real time (instantaneously) with respect to image data that is input in accordance with a horizontal synchronization timing generated while the CPU 101 is encoding (P1VLC) coefficient data of the first precinct, as indicated by an arrow enclosed by a dotted ellipse 171 in
Provided that the encoding process of one precinct can be all finished between horizontal synchronization timings, the CPU 101 is not required to buffer image data and thus can perform a wavelet transform process in real time. However, employing such a method is not practical because the method places an extremely large load on the CPU 101, and to realize this method, it is necessary to make the operating frequency of the CPU 101 extremely high, which may lead to an increase in cost. In order to process image data at the processing speed of a CPU that is available at practical cost, buffering of input image data as described above becomes necessary.
It should be noted that
Next, a more specific description will be given of how the encoding section 10 that executes processes in accordance with the above-mentioned flow is realized. FIG. 14 is a functional block diagram showing functions included in the CPU 101 that executes a software program for realizing the encoding section 10 that executes processes in accordance with the above-mentioned flow.
In
The control section 201 controls the flow of respective processes of the encoding section 10 by controlling the operations of respective sections from the analysis filtering process executing section 211 to the output coefficient reading section 217. Further, the control section 201 also controls the input/output of data to/from an image data buffer section 221 described later.
The analysis filtering process executing section 211 is controlled by the control section 201 to execute an analysis filtering process for realizing the function of the wavelet transform section 11 shown in
The coefficient reordering process executing section 212 is controlled by the control section 201 to execute a coefficient reordering process for realizing the function of the coefficient reordering section 14 shown in
The entropy encoding process executing section 213 is controlled by the control section 201 to execute an entropy encoding process for realizing the function of the entropy encoding section 15 shown in
The intermediate calculation data reading section 214 and the intermediate calculation data writing section 215 are controlled by the control section 201 to read or write intermediate calculation data to or from a cache memory (not shown), the RAM 103, or the like, thereby forming the intermediate calculation buffer section 12 shown in
The output coefficient writing section 216 and the output coefficient reading section 217 are controlled by the control section 201 to read or write output coefficients to or from a cache memory (not shown), the RAM 103, or the like, thereby forming the coefficient reordering buffer section 13 shown in
An image data buffer section 221 is a buffer section that temporarily holds inputted image data, and is formed in, for example, the RAM 103 by control of the control section 201. The image data buffer section 221 is controlled by the control section 201 to temporarily hold image data that is supplied substantially regularly one line by one line, and supplies the held image data one line by one line to the analysis filtering process executing section 211 in accordance with a predetermined timing.
While
The control section 201 shown in
When the control process is started, in step S101, the control section 201 causes the image data buffer section 221 to be formed in, for example, the RAM 103, and causes the image data buffer section 221 to start accumulation of supplied image data. Thereafter, the image data buffer section 221 controlled in this way temporarily holds image data that is supplied one line by one line, until the control process is finished.
In step S102, the control section 201 determines whether or not predetermined lines of image data have been accumulated in the image data buffer section 221, and waits on standby until it is determined that the predetermined lines of image data have been accumulated. If it is determined that a sufficient amount of image data for performing a lifting operation in the analysis filtering process executing section 211 have been accumulated, the control section 201 advances the process to step S103.
In step S103, the control section 201 controls the analysis filtering process executing section 211 to acquire the number of lines (for example, two lines or three lines) of image data necessary for performing a single lifting operation in the lowest level, that is, for performing a single lifting operation of the analysis filtering process at decomposition level 1, from the image data buffer section 221. Through this control, the analysis filtering process executing section 211 acquires the number of lines of image data necessary for performing a single lifting operation in the lowest level, in the order of line numbers from the image data buffer section 221.
In step S104, the control section 201 controls the analysis filtering process executing section 211 to acquire, from the intermediate calculation buffer section 12, intermediate calculation data necessary for the lifting operation that is going to be performed next. Through this control, the analysis filtering process executing section 211 controls the intermediate calculation data reading section 214 to read, from the intermediate calculation buffer section 12, intermediate calculation data necessary for the lifting operation that is going to be performed next, and to supply the intermediate calculation data to the analysis filtering process executing section 211 (that is, the analysis filtering process executing section 211 acquires intermediate calculation data). Through this control, the intermediate calculation data reading section 214 reads the requested intermediate calculation data from the intermediate calculation buffer section 12, and supplies the read data to the analysis filtering process executing section 211.
In step S105, the control section 201 controls the analysis filtering process executing section 211 to execute a single lifting operation of an analysis filtering process. Through this control, as described above with reference to
When the lifting operation is performed, in step S106, the control section 201 controls the analysis filtering process executing section 211 to hold, from among image data and coefficient data used in the lifting operation and coefficient data obtained by the lifting operation, those pieces of data which are to be used for the subsequent lifting operations, in the intermediate calculation buffer section 12 as intermediate calculation data. Through this control, the analysis filtering process executing section 211 supplies intermediate calculation data to the intermediate calculation data writing section 215, and also controls the intermediate calculation data writing section 215 to write the supplied intermediate calculation data into the intermediate calculation buffer section 12. Through this control, the intermediate calculation data writing section 215 writes the intermediate calculation data supplied from the analysis filtering process executing section 211 into the intermediate calculation buffer section 12 to be held therein.
In step S107, the control section 201 determines whether or not a lifting operation is possible without input of additional image data. If it is determined that a lifting operation is possible, the control section 201 advances the process to step S108, where the control section 201 controls the analysis filtering process executing section 211 to hold output coefficients obtained by the lifting operation into the coefficient reordering buffer section 13. Through this control, the analysis filtering process executing section 211 supplies output coefficients to the output coefficient writing section 216, and controls the output coefficient writing section 216 to write the supplied output coefficients into the coefficient reordering buffer section 13. Through this control, the output coefficient writing section 216 writes the output coefficients supplied from the analysis filtering process executing section 211 into the coefficient reordering buffer section 13 to be held therein.
When the process of step S108 is finished, the control section 201 returns the process to step S104, and repeats the subsequent processes. That is, as described above with reference to
Then, if it is determined in step S107 that there are no more lifting operations that can be executed, the control section 201 advances the process to step S109.
In step S109, the control section 201 determines whether or not a filtering process of one precinct has been finished. If it is determined that a filtering process of one precinct has not been finished, the control section 201 advances the process to step S110, and as in step S108, the control section 201 controls the analysis filtering process executing section 211 to hold output coefficients obtained by a lifting operation into the coefficient reordering buffer section 13. When the process of step S110 is finished, the control section 201 returns the process to step S103, and repeats the subsequent processes. That is, as described above with reference to
Then, if it is determined in step S109 that a filtering process of one precinct has been finished, the control section 201 advances the process to step S121 in
Through the control of step S121, the entropy encoding process executing section 213 encodes the coefficient data that is subjected to a synthesis filtering process in the fifth turn and the coefficient data that is subjected to a synthesis filtering process in the sixth turn in order, and sequentially outputs the obtained encoded data.
When the above encoding process is finished, in step S122, the control section 201 controls the coefficient reordering process executing section 212 to read output coefficients in the coefficient reordering buffer section 13 in a predetermined order. Through this control, the coefficient reordering process executing section 212 controls the output coefficient reading section 217 to read pieces of coefficient data held in the coefficient reordering buffer section 13 in the order in which they are subjected to a synthesis filtering process, and to supply the read pieces of coefficient data to the coefficient reordering process executing section 212. Through this control, the output coefficient reading section 217 reads pieces of coefficient data held in the coefficient reordering buffer section 13 in the order in which they are subjected to a synthesis filtering process, and supplies the read pieces of coefficient data to the coefficient reordering process executing section 212. The coefficient reordering process executing section 212 sequentially supplies the supplied pieces of coefficient data to the entropy encoding process executing section 213.
In step S123, the control section 201 controls the entropy encoding process executing section 213 to apply entropy encoding to the coefficient data read from the coefficient reordering buffer section 13. Through this control, the entropy encoding process executing section 213 encodes the read coefficient data, and outputs the obtained encoded data.
In step S124, the control section 201 determines whether or not output coefficients that have not been encoded exist in the coefficient reordering buffer section 13. If it is determined that such output coefficients exist, the control section 201 returns the process to step S122, and repeats the subsequent processes. That is, by repeating the processes from step S122 to step S124, the control section 201 executes an encoding process with respect to all the output coefficients held in the coefficient reordering buffer section 13. At the point in time when the process of step S121 is started, output coefficients corresponding to one precinct (excluding the output coefficients of the last lifting operation) are accumulated in the coefficient reordering buffer section 13. The control section 201 executes an encoding process with respect to all of these output coefficients.
If it is determined in step S124 that unprocessed output coefficients do not exist in the coefficient reordering buffer section 13, the control section 201 advances the processing to step S125.
In step S125, the control section 201 determines whether or not an analysis filtering process of one picture has been finished. That is, the control section 201 determines whether or not an analysis filtering process (and an entropy encoding process) has been performed with respect to all of the precincts within the picture. If it is determined that unprocessed precincts exist, the control section returns the process to step S102 in
If it is determined in step S125 that an analysis filtering process of one picture has been finished, the control section 201 terminates the control process. It should be noted that this control process is repeatedly executed for each picture of image data.
By performing a control process as described above, the control section 201 performs an analysis filtering process efficiently, thereby reducing the memory capacity required of the image data buffer section 221. Further, since the control section 201 does not cause the output coefficients of the last lifting operation to be accumulated in the coefficient reordering buffer section 13, it is possible to achieve a reduction in the memory capacity required of the coefficient reordering buffer section 13 and also a reduction in load or delay time.
While
Next, another way of advancing processes will be described.
As described above with reference to
For example, in the case of
Accordingly, in order to suppress occurrence of such a waiting time and improve the usage efficiency of the CPU 101, as shown in
In the example shown in
Since
As shown in
That is, in the example shown in
In
That is, in
Then, when image data of line number 26 (and 25) is inputted, the CPU 101 performs lifting operations DWT(Lev1) and DWT(Lev2) of the portion enclosed by the curved line 272 in
Next, when image data of line number 28 (and 27) is inputted, the CPU 101 performs lifting operation DWT(Lev1) of the portion enclosed by the curved line 273 in
Then, when image data of line number 30 (and 29) is inputted, the CPU 101 performs lifting operations DWT(Lev1), DWT(Lev2), and DWT(Lev3) of the portion enclosed by the curved line 274 in
In this way, a precinct to which an entropy encoding process is to be applied is delayed by one cycle with respect to a precinct to which a wavelet transform process is to be applied. That is, the encoding process always applies encoding to frequency components generated earlier than frequency components of the lowest frequency band generated last by a lifting operation. The CPU 101 can thus execute an entropy encoding process by making use of the free time produced during a wavelet transform process, thus allowing the wavelet transform process and the entropy encoding process to be executed apparently in a simultaneous parallel manner. This makes it possible to reduce the waiting time of the CPU 101, thereby achieving improved usage efficiency of the CPU 101.
Further, The CPU 101 can thus easily perform an analysis filtering process in real time (instantaneously). As shown in
Therefore, in this case, there is no need to buffer inputted image data, thus making the image data buffer section 221 unnecessary. Therefore, as compared with the method described above with reference to
A comparison between
In the method shown in
Therefore, if a comparison is made by also taking into account this amount of input image data to be buffered, the method shown in
It should be noted that while
Further, in the case of
It should be noted that the arrangement shown in
Next, a more specific description will be given of how the encoding section 10 that executes processes in accordance with the above-mentioned flow is realized.
The control section 201 shown in
When the control process is started, in step S201, the control section 201 determines whether or not a predetermined number of lines (for example, two or three lines) of image data have been inputted, and waits on standby until it is determined that the predetermined number of lines of image data have been inputted. Then, if it is determined that the predetermined number of lines of image data have been inputted, the control section 201 advances the process to step S202.
In step S202, the control section 201 controls the analysis filtering process executing section 211 to acquire, from the intermediate calculation buffer section 12, intermediate calculation data necessary for the lifting operation that is going to be performed next. Through this control, the analysis filtering process executing section 211 controls the intermediate calculation data reading section 214 to read, from the intermediate calculation buffer section 12, intermediate calculation data necessary for the lifting operation that is going to be performed next, and to supply the intermediate calculation data to the analysis filtering process executing section 211 (that is, the analysis filtering process executing section 211 acquires intermediate calculation data). Through this control, the intermediate calculation data reading section 214 reads the requested intermediate calculation data from the intermediate calculation buffer section 12, and supplies the read data to the analysis filtering process executing section 211.
In step S203, the control section 201 controls the analysis filtering process executing section 211 to execute a single lifting operation of an analysis filtering process. Through this control, as described above with reference to
When the lifting operation is performed, in step S204, the control section 201 controls the analysis filtering process executing section 211 to hold, from among image data and coefficient data used in the lifting operation and coefficient data obtained by the lifting operation, those pieces of data which are to be used for the subsequent lifting operations, in the intermediate calculation buffer section 12 as intermediate calculation data. Through this control, the analysis filtering process executing section 211 supplies intermediate calculation data to the intermediate calculation data writing section 215, and also controls the intermediate calculation data writing section 215 to write the supplied intermediate calculation data into the intermediate calculation buffer section 12. Through this control, the intermediate calculation data writing section 215 writes the intermediate calculation data supplied from the analysis filtering process executing section 211 into the intermediate calculation buffer section 12 to be held therein.
In step S205, the control section 201 controls the analysis filtering process executing section 211 to hold output coefficients obtained by the lifting operation into the coefficient reordering buffer section 13. Through this control, the analysis filtering process executing section 211 supplies output coefficients to the output coefficient writing section 216, and controls the output coefficient writing section 216 to write the supplied output coefficients into the coefficient reordering buffer section 13. Through this control, the output coefficient writing section 216 writes the output coefficients supplied from the analysis filtering process executing section 211 into the coefficient reordering buffer section 13 to be held therein.
In step S206, the control section 201 determines whether or not a lifting operation is possible without input of additional image data. If it is determined that a lifting operation is possible, the control section 201 returns the process to step S202, and repeats the subsequent processes. That is, as described above with reference to
Then, if it is determined in step S206 that there are no more lifting operations that can be executed, the control section 201 advances the process to step S207.
In step S207, the control section 201 determines whether or not a filtering process of one picture has been finished. If it is determined that a filtering process of one picture has not been finished, the control section 201 advances the process to step S208, where the control section 201 specifies a set of target processing output coefficients from the previous precinct held in the coefficient reordering buffer section 13. That is, the control section 201 specifies the output coefficients that are to be encoded during the free time until the start timing of the next lifting operation, from among frequency components generated earlier than the frequency components of the lowest frequency band generated last by the lifting operation. It should be noted that if it is the first precinct that has been subjected to an analysis filtering process, the control section 201 sets the last precinct of the previous picture as the previous precinct, and specifies a set of target processing output coefficients from that previous precinct. Further, if it is the first precinct of the top picture that has been subjected to an analysis filtering process, the control section 201 omits the processes from step S208 to step S211, returns the process to step S201, and executes the subsequent processes.
In step S209, the control section 201 controls the coefficient reordering process executing section 212 to read pieces of coefficient data specified as the target processing output coefficients, in a predetermined order. Through this control, the coefficient reordering process executing section 212 controls the output coefficient reading section 217 to read pieces of coefficient data (target processing output coefficients) held in the coefficient reordering buffer section 13 in the order in which they are subjected to a synthesis filtering process, and to supply the read pieces of coefficient data to the coefficient reordering process executing section 212. Through this control, the output coefficient reading section 217 reads pieces of coefficient data held in the coefficient reordering buffer section 13 in the order in which they are subjected to a synthesis filtering process, and supplies the read pieces of coefficient data to the coefficient reordering process executing section 212. The coefficient reordering process executing section 212 sequentially supplies the supplied pieces of coefficient data to the entropy encoding process executing section 213.
In step S210, the control section 201 controls the entropy encoding process executing section 213 to apply entropy encoding to the coefficient data read from the coefficient reordering buffer section 13. Through this control, the entropy encoding process executing section 213 encodes the read coefficient data, and outputs the obtained encoded data.
In step S211, the control section 201 determines whether or not target processing output coefficients that have not been encoded exist in the coefficient reordering buffer section 13. If it is determined that such output coefficients exist, the control section 201 returns the process to step S209, and repeats the subsequent processes. That is, by repeating the processes from step S209 to step S211, the control section 201 executes an encoding process with respect to all the target processing output coefficients held in the coefficient reordering buffer section 13.
If it is determined in step S211 that target processing output coefficients that have not been processed do not exist in the coefficient reordering buffer section 13, the control section 201 returns the process to step S201, and repeats the subsequent processes. That is, by repeating the processes from step S201 to step S211, the control section 201 executes a wavelet transform process with respect to all the precincts within a picture, and further executes an entropy encoding process during a free time within the wavelet transform process, thereby executing the wavelet transform process and the entropy encoding process apparently in a simultaneous parallel manner.
If it is determined in step S207 that a filtering process of one picture has been finished, the control section 201 terminates the control process. It should be noted that if this control process is performed with respect to the last picture of image data, the control section 201 specifies all the remaining output coefficients held in the coefficient reordering buffer section 13 as a set of target processing output coefficients, performs the same processes as those from step S209 to step S211 to encode all the output coefficients and output the resulting encoded data, and then terminates the control process.
Through the above-mentioned control process, the control section 201 can easily execute a wavelet transform process and an entropy encoding process in a simultaneous parallel manner to generate encoded data in real time from image data inputted at a predetermined speed and output the generated encoded data. This also makes it unnecessary to hold input image data. In this way, it is possible to reduce the load due to a wavelet transform process and an encoding process.
While
Next, another way of advancing processes will be described.
As described above with reference to
In
It should be noted, however, that in the case of
In the case of
More specifically, in the case of
Then, when image data of line number 18 (and 17) is inputted, the CPU 101 performs lifting operations DWT(Lev1) and DWT(Lev2) of the portion enclosed by the curved line 162 in
Further, when image data of line number 20 (and 19) is inputted, the CPU 101 performs lifting operation DWT(Lev1) of the portion enclosed by the curved line 163 in
When image data of line number 22 (and 21) is inputted, the CPU 101 performs lifting operations DWT(Lev1), DWT(Lev2), and DWT(Lev3) of the portion enclosed by the curved line 164 in
That is, as shown in
However, in the case of
Comparing
Next, a more specific description will be given of how the encoding section 10 that executes processes in accordance with the above-mentioned flow is realized.
The encoded data writing section 312 and the encoded data reading section 313 are controlled by the control section 201 to read or write encoded data generated by an entropy encoding process to or from a cache memory (not shown), the RAM 103, or the like, thereby forming the code buffer section 311 shown in
The control section 201 shown in
When the control process is started, in step S301, the control section 201 determines whether or not a predetermined number of lines (for example, two or three lines) of image data have been inputted, and waits on standby until it is determined that the predetermined number of lines of image data have been inputted. Then, if it s determined that the predetermined number of lines of image data have been inputted, the control section 201 advances the process to step S302.
In step S302, the control section 201 controls the analysis filtering process executing section 211 to acquire, from the intermediate calculation buffer section 12, intermediate calculation data necessary for the lifting operation that is going to be performed next. Through this control, the analysis filtering process executing section 211 controls the intermediate calculation data reading section 214 to read, from the intermediate calculation buffer section 12, intermediate calculation data necessary for the lifting operation that is going to be performed next, and to supply the intermediate calculation data to the analysis filtering process executing section 211 (that is, the analysis filtering process executing section 211 acquires intermediate calculation data). Through this control, the intermediate calculation data reading section 214 reads the requested intermediate calculation data from the intermediate calculation buffer section 12, and supplies the read data to the analysis filtering process executing section 211.
In step S303, the control section 201 controls the analysis filtering process executing section 211 to execute a single lifting operation of an analysis filtering process. Through this control, as described above with reference to
When the lifting operation is performed, in step S304, the control section 201 controls the analysis filtering process executing section 211 to hold, from among image data and coefficient data used in the lifting operation and coefficient data obtained by the lifting operation, those pieces of data which are to be used for the subsequent lifting operations, in the intermediate calculation buffer section 12 as intermediate calculation data. Through this control, the analysis filtering process executing section 211 supplies intermediate calculation data to the intermediate calculation data writing section 215, and also controls the intermediate calculation data writing section 215 to write the supplied intermediate calculation data into the intermediate calculation buffer section 12. Through this control, the intermediate calculation data writing section 215 writes the intermediate calculation data supplied from the analysis filtering process executing section 211 into the intermediate calculation buffer section 12 to be held therein.
In step S305, the control section 201 determines whether or not a lifting operation is possible without input of additional image data. If it is determined that a lifting operation is possible, the control section 201 advances the process to step S306.
In step S306, the control section 201 controls the analysis filtering process executing section 211 to hold output coefficients obtained by the lifting operation into the coefficient reordering buffer section 13. Through this control, the analysis filtering process executing section 211 supplies output coefficients to the output coefficient writing section 216, and controls the output coefficient writing section 216 to write the supplied output coefficients into the coefficient reordering buffer section 13. Through this control, the output coefficient writing section 216 writes the output coefficients supplied from the analysis filtering process executing section 211 into the coefficient reordering buffer section 13 to be held therein.
When the process of step S306 is finished, the control section 201 returns the process to step S302, and repeats the subsequent processes. That is, as described above with reference to
If it is determined in step S305 that there are no more lifting operations that can be executed, the control section 201 advances the process to step S307. In step S307, the control section 201 determines whether or not a filtering process of one precinct has been finished. If it is determined that a filtering process of one precinct has not been finished, the control section 201 advances the process to step S308.
In step S308, the control section 201 controls the analysis filtering process executing section 211 to hold output coefficients obtained by the lifting operation into the coefficient reordering buffer section 13. Through this control, the analysis filtering process executing section 211 supplies output coefficients to the output coefficient writing section 216, and controls the output coefficient writing section 216 to write the supplied output coefficients into the coefficient reordering buffer section 13. Through this control, the output coefficient writing section 216 writes the output coefficients supplied from the analysis filtering process executing section 211 into the coefficient reordering buffer section 13 to be held therein.
In step S309, the control section 201 specifies a set of target processing output coefficients from the coefficient data of the current target processing precinct held in the coefficient reordering buffer section 13. That is, the control section 201 specifies the output coefficients that are to be encoded during the free time until the timing of starting the next lifting operation.
In step S310, the control section 201 controls the coefficient reordering process executing section 212 to read pieces of coefficient data specified as the target processing output coefficients, in a predetermined order. Through this control, the coefficient reordering process executing section 212 controls the output coefficient reading section 217 to read pieces of coefficient data (target processing output coefficients) held in the coefficient reordering buffer section 13 in the order in which they are subjected to a synthesis filtering process, and to supply the read pieces of coefficient data to the coefficient reordering process executing section 212. Through this control, the output coefficient reading section 217 reads pieces of coefficient data held in the coefficient reordering buffer section 13 in the order in which they are subjected to a synthesis filtering process, and supplies the read pieces of coefficient data to the coefficient reordering process executing section 212. The coefficient reordering process executing section 212 sequentially supplies the supplied pieces of coefficient data to the entropy encoding process executing section 213.
In step S311, the control section 201 controls the entropy encoding process executing section 213 to apply entropy encoding to the coefficient data read from the coefficient reordering buffer section 13. Through this control, the entropy encoding process executing section 213 encodes the read coefficient data.
In step S312, the control section 201 controls the entropy encoding process executing section 213 to hold the encoded data generated in step S311 into the code buffer section 311. Through this control, the entropy encoding process executing section 213 supplies encoded data to the encoded data writing section 312, and controls the encoded data writing section 312 to write the supplied encoded data into the code buffer section 311. Through this control, the encoded data writing section 312 writes the output coefficients supplied from the entropy encoding process executing section 213 into the code buffer section 311 to be held therein.
In step S313, the control section 201 determines whether or not target processing output coefficients that have not been encoded exist in the coefficient reordering buffer section 13. If it is determined that such output coefficients exist, the control section 201 returns the process to step S310, and repeats the subsequent processes. That is, by repeating the processes from step S310 to step S313, the control section 201 executes an encoding process with respect to all the target processing output coefficients held in the coefficient reordering buffer section 13.
If it is determined in step S313 that target processing output coefficients that have not been processed do not exist in the coefficient reordering buffer section 13, the control section 201 returns the process to step S301, and repeats the subsequent processes. That is, by repeating the processes from step S301 to step S313, the control section 201 executes a wavelet transform process with respect to all the precincts within a picture, and further executes an entropy encoding process during a free time in the wavelet transform process, thereby executing the wavelet transform process and the entropy encoding process apparently in a simultaneous parallel manner.
If it is determined in step S307 that a filtering process of one precinct has been finished, the control section 201 advances the process to step S321 in
In step S321 in
Through the control of step S321, the entropy encoding process executing section 213 applies encoding to, for example, coefficient data that is subjected to a synthesis filtering process in the fifth turn and coefficient data that is subjected to a synthesis filtering process in the sixth turn in order, and sequentially outputs the obtained pieces of encoded data.
When the above encoding process is finished, in step S322, the control section 201 controls the encoded data reading section 313 to read pieces of encoded data in a predetermined order from the code buffer section 311. Through this control, the encoded data reading section 313 reads pieces of encoded data held in the code buffer section 311 in the order in which they are subjected to a synthesis filtering process, for example, and supplies the read pieces of encoded data to the entropy encoding process executing section 213. The entropy encoding process executing section 213 outputs the supplied encoded data succeeding to the encoded data encoded and outputted in step S321.
In step S323, the control section 201 determines whether or not a filtering process of one picture has been finished. If it is determined that a filtering process of one picture has not been finished, the control section 201 returns the process to step S301 in
If it is determined in step S323 that a filtering process of one picture has been finished, the control section 201 advances the process to step S324, and sets the remaining output coefficients held in the coefficient reordering buffer section 13 as a set of target processing output coefficients.
In step S325, the control section 201 controls the coefficient reordering process executing section 212 to read pieces of coefficient data specified as the target processing output coefficients, in a predetermined order. Through this control, the coefficient reordering process executing section 212 controls the output coefficient reading section 217 to read pieces of coefficient data (target processing output coefficients) held in the coefficient reordering buffer section 13 in the order in which they are subjected to a synthesis filtering process, and to supply the read pieces of coefficient data to the coefficient reordering process executing section 212. Through this control, the output coefficient reading section 217 reads pieces of coefficient data held in the coefficient reordering buffer section 13 in the order in which they are subjected to a synthesis filtering process, and supplies the read pieces of coefficient data to the coefficient reordering process executing section 212. The coefficient reordering process executing section 212 sequentially supplies the supplied pieces of coefficient data to the entropy encoding process executing section 213.
In step S326, the control section 201 controls the entropy encoding process executing section 213 to apply entropy encoding to coefficient data read from the coefficient reordering buffer section 13. Through this control, the entropy encoding process executing section 213 encodes the read coefficient data, and outputs the obtained encoded data.
In step S327, the control section 201 determines whether or not target processing output coefficients that have not been encoded exist in the coefficient reordering buffer section 13. If it is determined that such output coefficients exist, the control section 201 returns the process to step S325, and repeats the subsequent processes.
If it is determined in step S327 that target processing output coefficients that have not been processed do not exist in the coefficient reordering buffer section 13, the control section 201 terminates the control process.
By performing the above-described control process, the control section 201 executes a wavelet transform process and an entropy encoding process in a simultaneous parallel manner, thereby making it easier to generate encoded data in real time from image data inputted at a predetermined speed and output the generated encoded data. This also makes it unnecessary to hold input image data. Further, since encoded data can be thus set as the data to be held, it is possible to reduce the memory capacity required for the process, and reduce the load due to a wavelet transform process and an encoding process.
While
The foregoing description is directed to a case where, as described above with reference to
However, unlike the personal computer 100 having one CPU 101, the personal computer 400 has a CPU 401 and a CPU 402. Each of the CPU 401 and the CPU 402 is basically the same as the CPU 101. The CPU 401 and the CPU 402 can execute processes independently from each other. That is, the personal computer 400 has two arithmetic processing sections (the CPU 401 and the CPU 402) that operate independently from each other.
To realize the encoding section 10 shown in
In the case of the example in
As in the other examples described above, the CPU 401 performs a lifting operation (DWT) that can be executed every time two lines of image data are inputted, generates output coefficients, and hold the output coefficients in the coefficient reordering buffer section 13. During the execution of this analysis filtering process, in parallel with this analysis filtering process, the other CPU 401 reads output coefficients accumulated in the coefficient reordering buffer section 13 in the order in which they are subjected to a synthesis filtering process, applies entropy encoding (VLC) to the read output coefficients, and sequentially outputs the obtained pieces of coefficient data.
By using two arithmetic processing sections in this way, the load on each CPU is reduced. Therefore, even in the case of a CPU that operates at lower speed than that in the case of the other examples described above, a wavelet transform process and an entropy encoding process can be easily executed in real time with respect to image data inputted at a predetermined speed, without causing overflow.
As shown in
Further, as shown in
It should be noted, however, that in this case, operations must be coordinated between the CPU 401 and the CPU 402, thus requiring a mechanism that controls both the processes executed in the CPU 401 and the processes executed in the CPU 402.
The CPU 401 has functions related to an analysis filtering process, and includes the analysis filtering process executing section 211, the intermediate calculation data reading section 214, the intermediate calculation data writing section 215, and the output coefficient writing section 216. The CPU 402 has functions related to coefficient reordering and entropy encoding, and includes the coefficient reordering process executing section 212, the entropy encoding process executing section 213, and the output coefficient reading section 217.
In
As shown in
The CPU 401 further has a control section 511 and an analysis filter control section 512, and the CPU 402 further has a reordering/encoding control section 513.
The control section 511 controls the operation of the analysis filter control section 512 of the CPU 401 and the operation of the reordering/encoding control section 513 of the CPU 402. The analysis filter control section 512 controls the operations of respective functional blocks of the CPU 401 to perform control related to an analysis filtering process executed in the CPU 401. The reordering/encoding control section 513 controls the operations of respective functional blocks of the CPU 402 to perform control related to coefficient reordering and entropy encoding executed in the CPU 402.
Referring to the flowchart of
When the control process is started, in step S401, the control section 511 controls the analysis filter control section 512 to start an analysis filter control process. Through this control, the analysis filter control section 512 starts the analysis filter control process. The analysis filter control process will be described later. In step S402, the control section 511 controls the reordering/encoding control section 513 to start a reordering/encoding control process. Through this control, the reordering/encoding control section 513 starts the reordering/encoding control process. The reordering/encoding control process will be described later.
Referring to the flowchart of
When the analysis filter control process is started, in step S411, the analysis filter control section 512 determines whether or not a predetermined number of lines (for example, two or three lines) of image data have been inputted, and waits on standby until it is determined that the predetermined number of lines of image data have been inputted. Then, if it is determined that the predetermined number of lines of image data have been inputted, the analysis filter control section 512 advances the process to step S412.
In step S412, the analysis filter control section 512 controls the analysis filtering process executing section 211 to acquire, from the intermediate calculation buffer section 12, intermediate calculation data necessary for the lifting operation that is going to be performed next. Through this control, the analysis filtering process executing section 211 controls the intermediate calculation data reading section 214 to read, from the intermediate calculation buffer section 12, intermediate calculation data necessary for the lifting operation that is going to be performed next, and to supply the intermediate calculation data to the analysis filtering process executing section 211 (that is, the analysis filtering process executing section 211 acquires intermediate calculation data). Through this control, the intermediate calculation data reading section 214 reads the requested intermediate calculation data from the intermediate calculation buffer section 12, and supplies the read data to the analysis filtering process executing section 211.
In step S413, the analysis filter control section 512 controls the analysis filtering process executing section 211 to execute a single lifting operation of an analysis filtering process. Through this control, as described above with reference to
When the lifting operation is performed, in step S414, the analysis filter control section 512 controls the analysis filtering process executing section 211 to hold, from among image data and coefficient data used in the lifting operation and coefficient data obtained by the lifting operation, those pieces of data which are to be used for the subsequent lifting operations, in the intermediate calculation buffer section 12 as intermediate calculation data. Through this control, the analysis filtering process executing section 211 supplies intermediate calculation data to the intermediate calculation data writing section 215, and also controls the intermediate calculation data writing section 215 to write the supplied intermediate calculation data into the intermediate calculation buffer section 12. Through this control, the intermediate calculation data writing section 215 writes the intermediate calculation data supplied from the analysis filtering process executing section 211 into the intermediate calculation buffer section 12 to be held therein.
In step S415, the analysis filter control section 512 controls the analysis filtering process executing section 211 to hold output coefficients obtained by the lifting operation into the coefficient reordering buffer section 13. Through this control, the analysis filtering process executing section 211 supplies output coefficients to the output coefficient writing section 216, and controls the output coefficient writing section 216 to write the supplied output coefficients into the coefficient reordering buffer section 13. Through this control, the output coefficient writing section 216 writes the output coefficients supplied from the analysis filtering process executing section 211 into the coefficient reordering buffer section 13 to be held therein.
In step S416, the analysis filter control section 512 determines whether or not a lifting operation is possible without input of additional image data. If it is determined that lifting operation is possible, the analysis filter control section 512 returns the process to step S412, and repeats the subsequent processes. That is, as described above with reference to
Then, if it is determined in step S416 that there are no more lifting operations that can be executed, the analysis filter control section 512 advances the process to step S417. In step S417, the analysis filter control section 512 determines whether or not a filtering process of one picture has been finished. If it is determined that a filtering process of one picture has not been finished, the analysis filter control section 512 returns the process to step S411, and repeats the subsequent processes.
If it is determined in step S417 that an analysis filtering process of one picture has been finished, the analysis filter control section 512 terminates the analysis filter control process.
Next, referring to the flowchart of
When the reordering/encoding control process is started, in step S421, the reordering/encoding control section 513 determines whether or not output coefficients that have not been encoded exist in the coefficient reordering buffer section 13. If it is determined that output coefficients that have not been encoded exist, the reordering/encoding control section 513 advances the process to step S422. In step S422, the reordering/encoding control section 513 controls the coefficient reordering process executing section 212 to read output coefficients held in the coefficient reordering buffer section 13 in a predetermined order. Through this control, the coefficient reordering process executing section 212 controls the output coefficient reading section 217 to read pieces of coefficient data (output coefficients) held in the coefficient reordering buffer section 13 in the order in which they are subjected to a synthesis filtering process, and to supply the read pieces of coefficient data to the coefficient reordering process executing section 212. Through this control, the output coefficient reading section 217 reads pieces of coefficient data held in the coefficient reordering buffer section 13 in the order in which they are subjected to a synthesis filtering process, and supplies the read pieces of coefficient data to the coefficient reordering process executing section 212. The coefficient reordering process executing section 212 sequentially supplies the supplied pieces of coefficient data to the entropy encoding process executing section 213.
In step S423, the reordering/encoding control section 513 controls the entropy encoding process executing section 213 to apply entropy encoding to the coefficient data read from the coefficient reordering buffer section 13. Through this control, the entropy encoding process executing section 213 encodes the read coefficient data, and outputs the obtained encoded data.
Upon finishing the process of step S423, the reordering/encoding control section 513 advances the process to step S424. Further, if it is determined in step S421 that unprocessed output coefficients do no exist, the reordering/encoding control section 513 omits the processes of step S422 and step S423, and advances the process to step S424.
In step S424, the reordering/encoding control section 513 determines whether or not a filtering process of one picture has been finished. If it is determined that a filtering process of one picture has not been finished, the reordering/encoding control section 513 returns the process to step S421, and repeats the subsequent processes.
If it is determined in step S424 that a filtering process of one picture has been finished, the reordering/encoding control section 513 terminates the reordering encoding control process.
By performing the respective control processes as described above, the control section 511, the analysis filter control section 512, and the reordering/encoding control section 513 can execute the wavelet transform process and the entropy encoding process actually in parallel by using two arithmetic processing sections, thereby easily generating encoded data in real time from image data inputted at a predetermined speed and outputting the encoded data.
While in
In the embodiments described above, description is directed to a case where the respective control sections control the respective processing sections from the analysis filtering process executing section 211 to the output coefficient reading section 217. However, the above-described control process may be performed in the respective processing sections from the analysis filtering process executing section 211 to the output coefficient reading section 217. That is, rather than separately providing control sections, the respective processing sections from the analysis filtering process executing section 211 to the output coefficient reading section 217 that actually process data may control each other as appropriate.
While the foregoing description is directed to a case where the wavelet transform process is controlled per each single lifting operation process, and the encoding process is controlled per each process with respect to each piece of coefficient data, control may be performed on the basis of any kind of processing unit that splits each of the wavelet transform process and the encoding process into a plurality of steps. For example, the wavelet transform process may be controlled per processing unit finer than a single lifting operation process, thus performing finer control to achieve a further improvement in the usage frequency of the CPU. Alternatively, the processing unit may be set as every plurality of lifting operation processes, thus further simplifying the control process. Also, for example, the encoding process may be controlled per processing unit finer than each piece of coefficient data, or the processing unit may be set as every plurality of pieces of coefficient data to thereby further simplify the control process.
Further, while in the foregoing description a 5×3 filter is used in the analysis filtering process, any kind of filter may be employed as the filter to be used in the filtering process. For example, a 9×7 filter may be used.
While the series of processes described above can be executed by software, the series of processes can be executed by hardware as well. If the series of processes is to be executed by software, a program constituting that software is installed from a program recording medium into a computer built in dedicated hardware, a general-purpose computer that can execute various functions when various programs are installed into the personal computer, for example, an information processing device of an information processing system made up of a plurality of devices, or the like.
As shown in, for example,
It should be noted that in this specification, as a matter of course, the steps describing the program recorded in the recording medium include not only processes that are executed in time series in the order as they appear in the description, but also processes that are not necessarily processed in time series but are executed in parallel or individually.
In this specification, the term system refers to the whole of a device made up of a plurality of devices.
It should be noted that the configuration described above as constituting a single device may be divided into a plurality of devices. Conversely, the configurations described above as constituting a plurality of devices may be combined into a single device. Configurations other than those described above may of course be added to the configuration of each device. Further, as far as the configuration or operation of the system as a whole remains substantially the same, a part of the configuration of a given device may be included in the configuration of another device. That is, an embodiment of the present invention is not limited to the embodiments described above, but various modifications are possible without departing from the scope of the present invention.
Number | Date | Country | Kind |
---|---|---|---|
2007-131866 | May 2007 | JP | national |