This application is based on and claims priority under 35 USC 119 from Japanese Patent Application No. 2008-273124 filed Oct. 23, 2008.
1. Technical Field
The present invention relates to encoding device, decoding device, image forming device, method, and program storage medium.
2. Related Art
There are known control units (controllers) of image forming devices that speed up processing by parallelizing encoding and decoding. In such control units, the number of encoders and decoders is set to be the number of bands, in order to execute encoding and decoding from a value of a target pixel estimated from near pixels. In the known technique, encoding and decoding is performed while sliding the target pixels and the reference pixels along a main scanning direction.
According to an aspect of the invention, the encoding device of the present invention includes: a first memory that stores image data; plural second memories that are associated with plural target pixels in the image data, each second memory storing pixel data of one or more reference pixels near the associated target pixel thereof, a controller that causes each second memory to store pixel data of the one or more reference pixels near the associated target pixel thereof, and plural encoders that perform encoding on each of the plural target pixels by estimating pixel data of each target pixel using pixel data of the one or more reference pixels near each respective target pixel stored in the plural second memories; wherein the plural target pixels have different positions in a subscanning direction such that one target pixel does not overlap with another target pixel in a main scanning direction, and the total amount of data of all of the reference pixels used by the plural encoders is equal to or less than the amount of information of one line of image data stored in the first memory.
Exemplary embodiments of the present invention will be described in detail based on the following figures, wherein:
Explanation will now be given of a first exemplary embodiment of the present invention, with reference to the drawings. In the present exemplary embodiment an example is explained of application of the present invention to an image forming device including an image processing device as an encoding device and a decoding device.
An image forming device 10 according to the present exemplary embodiment is, as shown in
The image processing device 12 includes an I/F (interface) 18, CPU (Central Processing Unit) 20, ROM (Read Only Memory) 22, memory 24, expansion circuit 26, encoding (compression) section 28, decoding (decompression) section 30, and I/F 32. The I/F 18 receives PDL data, described in a Page Description Language, input from an external PC (Personal Computer) 16. The expansion circuit 26 expands the input intermediate data into bit map data. The encoding section 28 is provided with N encoders, encoder 1 to encoder N, for encoding images. The decoding section 30 is provided with N decoders, decoder 1 to decoder N, for decoding encoded images. The I/F 32 is for sending image data to the image forming unit 14. The I/F 18, CPU 20, ROM 22, memory 24, expansion circuit 26, encoding section 28, decoding section 30, and I/F 32 are all mutually connected together through a bus 34. The memory 24 corresponds to the first memory.
The encoder 1 executes encoding (1) as explained in detail below. Encoders 2 to N each execute encoding (2) as explained in detail below. Each of the encoders 2 to N have a shift register 2 to N, respectively, that employ a FIFO (First In-First Out) protocol. In addition, a decoder 1 executes decoding (1) as explained in detail below. Decoders 2 to N each execute decoding (2) as explained in detail below. Each of the decoders 2 to N have a shift register 2 to N, respectively, that employ a FIFO (First In-First Out) protocol. The shift registers 2 to N of these encoders, and the shift registers 2 to N of the decoders, each have a storage capacity sufficient for pixel data of reference pixels used in the encoding by the respective encoder or in the decoding by the respective decoder. The total of the storage capacities of the shift registers 2 to N, having “storage capacities sufficient for pixel data of reference pixels”, is less than the “storage capacity sufficient for image data of one line of pixels of the image”. For example, if the number of reference pixels used in encoding of a respective encoder is 3 pixels and image data for one pixel uses 8 bits, then the storage capacity of the shift register of the respective encoder is 24 (3×8) bits worth of storage. Any storage capacity may be used that is capable of at least storing the image data of reference pixels used in the encoding of the respective encoder, or in the decoding of the respective decoders, as long as the total of the storage capacities of the shift registers 2 to N of the encoders, and the total of the storage capacities of the shift registers 2 to N of the decoders, are less than “storage capacity sufficient for image data of one line of pixels of the image”. The shift registers 2 to N of the encoder and the shift registers 2 to N of the decoders correspond to the second memory.
A basic program, such as OS or the like, is stored in the ROM 22 serving as a memory. There is also a control program stored in the ROM 22 for controlling the operation of the image forming device 10.
The CPU 20 reads out and executes the program from the ROM 22. Various types of data (various information) are temporarily stored in the memory 24.
The CPU 20, for example, is operated in the following manner by execution of a control program. Namely, the CPU 20 converts PDL data of an image to be formed, input from the PC 16, into intermediate data, inputs the converted intermediate data into the expansion circuit 26, and stores the bit map data expanded in the expansion circuit 26 in the memory 24. The image represented by bit map data is an image consisting of plural pixels Pi
The CPU 20 sends the 1st line of pixel data (image data) from the bit map data stored in the memory 24 to the encoder 1. The 1st line of the image represented by the bit map data stored in the memory 24 is thereby encoded. The CPU 20 sends one line of pixel data (image data) of the bit map data, in a similar manner, for each of the lines from the 2nd line to the Nth line to the corresponding encoder. “Sending one line of pixel data (image data) of the bit map data to the corresponding encoder” means that the pixel data of one line of pixels in the Kth line (K=1, 2, . . . , N) is sent to the encoder K.
Then, in encoding executed in each of the encoders K (K=2, 3, . . . N) described in detail later, for each target pixel specified, the CPU 20 stores pixel data (image data) of the pixel corresponding to reference pixels near the specified target pixel, out of the plural pixels of the image stored in the memory 24, in the shift register K of the encoder K. More specifically, the CPU 20 receives a report from the encoder K (K=2, 3, . . . N) stating that the pixel Pi′
The CPU 20 then stores the pixel data of the respective images encoded in each of the respective encoders 1 to N in the memory 24. Next, in a similar manner as in the above described process, the CPU 20 sends image data for one line of pixels in the (N+1)th line to the encoder 1, image data for one line of pixels in the (N+2)th line to the encoder 2, . . . up to the image data for one line of pixels in the (N+N)th line to the encoder N, and stores the pixel data of the respective images encoded in each of the encoders 1 to N in the memory 24. The CPU 20 repeats this processing until the last Rth line of the first page of the bit map data is reached. The image of the first page represented by the bit map data is thereby stored in the memory 24 as encoded information (encoded data), and the image of the first page is encoded. When the image of the first page has been encoded the CPU 20 performs similar processing on the second page, and so on for all the other pages in a similar manner. The images of all the pages represented by bit map data stored in the memory 24 are thereby encoded and stored in the memory 24.
In order to decode the first line of the encoded image stored in the memory 24, the CPU 20 sends the encoded values of the pixels of the 1st line of the encoded image (encoded data of the 1st line) stored in the memory 24 to the decoder 1. In a similar manner, for each line from the 2nd to the Nth line, the CPU 20 sends the encoded values of the pixels of one line of the encoded image (encoded data of each line) to the corresponding decoder. “Sending the encoded values of the pixels of one line of the encoded image . . . to the corresponding decoder” means that one line of encoded data for the Kth line (K=1, 2, . . . , N) is sent to the decoder K. Then, in decoding executed in each of the decoders K (K=2, 3, . . . N) described in detail later, from the image pixels decoded by the specific decoder K, the pixel data of those pixels corresponding to reference pixels near a specified target pixel decoded by another decoder (in the present exemplary embodiment the decoder K+1) different to the specific decoder K, are stored in the shift register K+1 of the corresponding decoder K+1, each time the target pixel of the another decoder (decoder K+1 in the present exemplary embodiment) is specified. More specifically, the CPU 20 receives from the decoder K+1 (K=1, 2, 3, . . . N−1) a report stating that the pixel Pi′
The CPU 20 then stores the image data of the respective images decoded by each of the respective decoders 1 to N in the memory 24. Next, in a similar manner to the above described processing, the encoded values of one line for the (N+1)th line is sent to the decoder 1, the encoded values of one line for the (N+2)th line is sent to the decoder 2, and so on until, the encoded values of one line for the (N+N)th line is sent to the decoder N. In a similar manner as in the above described process, the image data of the pixels decoded in each of the respective decoders 1 to N is stored in the memory 24. The CPU 20 repeats this processing until the last Rth line of the page 1. Thereby, decoded data for the image of page 1 (namely the bit map data of page 1) is stored in the memory 24, and the image of page 1 is decoded. When the image of page 1 has been decoded the CPU 20 then performs similar processing on page 2, and so on with similar processing performed for all of the pages. The images of all of the pages are thereby decoded, and stored in the memory 24.
The CPU 20 then sends the bit map data stored in the memory 24 for all of the pages to the image forming unit 14, via the I/F 32. An image forming medium is thereby sent from the image forming unit 14, with an image formed thereon based on the bit map data.
The PC 16 is connected to the I/F 18. The image forming unit 14 is connected to the I/F 32.
The expansion circuit 26 expands input intermediate data into bit map data.
Explanation will now be given of encoding (1) executed by the encoder 1, with reference to
First at step 100, determination is made as to whether or not pixel data (image data) for one line of pixels has been input from the CPU 20.
Determination processing is repeated at step 100 until it is determined that pixel data (image data) for one line of pixels has been input from the CPU 20.
When it is determined at step 100 that image data for one line of pixels has been input from the CPU 20 the routine proceeds to the next step 102. At step 102 a variable Q is initialized by setting the value of variable Q to 1.
At the next step 104, determination is made as to whether or not the value of variable Q is 1. When it is determined at step 104 that the value of variable Q is 1 then the routine proceeds to step 108. At step 108 determination is made as to whether or not the value of variable Q is the number of pixels W in one line of pixels. Determination is thereby made as to whether or not the processing for encoding of step 106, explained in detail below, has been performed for pixels up to the final pixel W of one line of pixels (from the 2nd to the Wth pixel).
At step 108, when the value of variable Q is determined as not being W, then it is concluded that the processing for encoding of step 106 has not been repeated for pixels up to the final pixel of one line of pixels (from the 2nd to the Wth pixel), and the routine proceeds to step 110.
The value of variable Q is incremented by 1 at step 110. The routine then returns to step 104.
However, if determination is made at step 104 that the value of variable Q is not 1 then the routine proceeds to step 106. At step 106 the Qth pixel of the pixels in the line L that was input this time, this being pixel PL
When, at step 108, the value of variable Q is determined to be W, then it is concluded that the processing for encoding of step 106 has been performed for pixels up to the final pixel of one line of pixels (from the 2nd to the Wth pixel), and the encoding (1) is ended.
Explanation will now be given of the encoding (2) executed in each of the respective encoders 2 to N, with reference to
First, at step 150, determination is made as to whether or not pixel data (image data) of one line of the pixels has been input from the CPU 20.
The determination processing is repeated at step 150 until determination is made that pixel data (image data) of one line of pixels has been input from the CPU 20.
When it is determined at step 150 that pixel data (image data) of one line of pixels has been input from the CPU 20 the routine proceeds to step 152. At step 152 variable Q is initialized by setting the value of variable Q to 1.
At the next step 154 determination is made as to whether or not the value of variable Q is 1. When it is determined at step 154 that the value of variable Q is 1 then the routine proceeds to step 164. At step 164 determination is made as to whether or not the value of variable Q is the number of pixels W in one line of pixels. Determination is thereby made as to whether or not the processing for encoding of steps 156 to 162, explained in detail below, has been performed for pixels up to the final pixel W of one line of pixels (from the 2nd to the Wth pixel).
At step 164, when the value of variable Q is determined as not being W, then it is concluded that the processing for encoding of steps 156 to 162 has not been repeated for pixels up to the final pixel of one line of pixels (from the 2nd to the Wth pixel), and the routine proceeds to step 166.
The value of variable Q is incremented by 1 at step 166. The routine then returns to step 154.
However, if determination is made at step 154 that the value of variable Q is not 1 then the routine proceeds to step 156. At step 156 the Qth pixel (the same value as the value of variable Q) of the pixels in line L that was input this time, this being pixel PL
In the next step 158, a result report representing the fact that the pixel PL
In the next step 160, determination is made as to whether or not the pixel data of the pixels PL−1
At step 160, when determination is made that the pixel data of the pixels PL−1
At step 162 the pixel data of the target pixel PL
However, when it is determined at step 164 that the value of variable Q is W, then it is concluded that the processing for encoding of steps 156 to 162 has been performed for pixels up to the final pixel of one line of pixels (from the 2nd to the Wth pixel), and encoding (2) is ended.
Explanation will next be given of the decoding (1) executed in the decoder 1, with reference to
First, at step 200, determination is made as to whether or not values (encoded values, namely encoded data) have been input from the CPU 20 for of one line of the pixels of the encoded image stored in the memory 24.
The determination processing is repeated at step 200 until determination is made that values (one line of encoded data (code data)) have been input from the CPU 20 for one line of the pixels of the encoded image stored in the memory 24.
When it is determined at step 200 that values of one line of the pixels of the encoded image stored in the memory 24 have been input from the CPU 20, the routine proceeds to the next step 202. At step 202 variable Q is initialized by setting the value of variable Q to 1.
At the next step 204 determination is made as to whether or not the value of variable Q is 1. When determination is made at step 204 that the value of variable Q is 1 then the routine proceeds to the next step 208. At step 208, determination is made as to whether or not the value of variable Q is the number of pixels W in one line of pixels. Determination is thereby made as to whether or not the processing for decoding of step 206, explained in detail below, has been performed for pixels up to the final pixel W of one line of pixels (from the 2nd to the Wth pixel).
When it is determined that the value of variable Q is not W at step 208, it is concluded that the decoding of step 206 has not been performed for pixels up to the final pixel of one line of pixels (from the 2nd to the Wth pixel), and the routine proceeds to step 210.
At step 210 the value of variable Q is incremented by 1. The routine then returns to step 204.
However, when it is determined at step 204 that the value of variable Q is not 1, the routine proceeds to the next step 206. At step 206 the Qth pixel of the pixels in the line L that was input this time, pixel PL
When, at step 208, the value of variable Q is determined to be W, then it is concluded that the decoding of step 206 has been performed for pixels up to the final pixel of one line of pixels (from the 2nd to the Wth pixel), and the decoding (1) is ended.
Explanation will now be given of the decoding (2) executed in each of the respective decoders 2 to N, with reference to
First, at step 250, determination is made as to whether or not values (encoded values) have been input for one line of the pixels of the encoded image stored in the memory 24.
The determination processing is repeated at step 250 until determination is made that values have been input from the CPU 20 for one line of the pixels of the encoded image stored in the memory 24.
When it is determined at step 250 that values of one line of the pixels of the encoded image stored in the memory 24 have been input from the CPU 20, the routine proceeds to the next step 252. At step 252 variable Q is initialized by setting the value of variable Q to 1.
At the next step 254 determination is made as to whether or not the value of variable Q is 1. When determination is made at step 254 that the value of variable Q is 1 then the routine proceeds to the next step 264. At step 264 determination is made as to whether or not the value of variable Q is the number of pixels W in one line of pixels. Determination is thereby made as to whether or not the processing for decoding of steps 256 to 262, explained in detail below, has been performed for pixels up to the final pixel W of one line of pixels (from the 2nd to the Wth pixel).
At step 264, when the value of variable Q is determined as not being W, then it is concluded that the processing for encoding of steps 256 to 262 has not been performed for pixels up to the final pixel of one line of pixels (from the 2nd to the Wth pixel), and the routine then proceeds to step 266.
The value of variable Q is incremented by 1 at step 266. The routine then returns to step 254.
However, if it is determined at step 254 that the value of variable Q is not 1 then the routine proceeds to the next step 256. At step 256 the Qth pixel (the same value as the value of variable Q) of the pixels in line L that was input this time, this being pixel PL
In the next step 258, a result report representing the fact that the pixel PL
In the next step 260, determination is made as to whether or not the pixel data of the pixels PL−1
When it is determined at step 260 that the pixel data of the pixels PL−1
At step 262 the image of the target pixel PL
However, when determination is made at step 264 that the value of variable Q is W, it is concluded that the processing of steps 256 to 262 has been repeated for pixels (from the 2nd to the Wth pixel) up to the final pixel of one line of pixels, and the decoding (2) is ended.
Note that in the above example, explanation has been given of a case using the reference pixels near the target pixel PL
As explained above, the image processing device 12, serving as an encoding device of the present exemplary embodiment, includes the memory 24, shift registers 2 to N, CPU 20, and the encoders 2 to N. The memory 24 is the first memory that stores an image composed of plural pixels. Each of the shift registers 2 to N of the encoders 2 to N is a second memory, having storage capacity capable of storing at least the pixel data of the reference pixels PL−1
The image processing device 12, serving as a decoding device of the present exemplary embodiment, includes the memory 24, plural shift registers 2 to N, plural decoders 2 to N, and the CPU 20. The memory 24 is the first memory for storing an image composed of plural pixels. The plural shift registers 2 to N of the plural encoders 2 to N are plural second memories, having storage capacity capable of storing at least the pixel data of the reference pixels PL−1
The image processing device 12 serving as a encoding device, is also provided with plural shift registers 2 to N and corresponding plural encoders to which the shift registers belong. The CPU 20, serving as a controller, specifies different target pixels for each of the plural encoders, and performs encoding. Encoding is thereby executed in parallel with the plural encoders.
In the image processing device 12 serving as a decoding device, the CPU 20, serving as a controller, specifies different target pixels for each of the plural decoders 1 to N, and performs decoding. Decoding is thereby executed in parallel with the plural decoders.
In addition, the target pixels processed by the plural encoders 1 to N are disposed such that they are each in different positions from each other in a subscanning direction, and a given target pixel does not overlap with another target pixel in a main scanning direction.
The target pixels processed by the plural decoders 1 to N are disposed such that they do not overlap with each other in the subscanning direction.
Explanation will now be given of a second exemplary embodiment. Similar parts of the configuration to that of the first exemplary embodiment, and similar processing thereto, are allocated the same reference numerals and explanation thereof is omitted.
In the first exemplary embodiment, in the shift registers 2 to N of the encoders and the shift registers 2 to N of the decoders, the number of reference pixels for reference in the processing of each of the encoders and each of the decoders is, for example 4 (3+1), or 3. However, in the present exemplary embodiment the number of reference pixels for reference in the encoder 2 and the decoder 2 is set, for example, at 4, or 3, and the number of reference pixels for reference in the encoder 3 and the decoder 3 is, for example 7 (3×2+1), or 6. Namely the present exemplary embodiment differs in that the number of reference pixels for reference in the encoder K and in the decoder K (K=2, 3, . . . N) is set up as ((K−1)×3+1) or ((K−1)×3). In the present exemplary embodiment, as long as the total of the storage capacities of the encoder shift registers 2 to N, and the total of the storage capacities of the decoder shift registers 2 to N, are less than “the storage capacity for image data of one line of pixels of the image”, the present exemplary embodiment may also be configured with a memory, in each encoder and in each decoder, capable of storing at least the image data of the reference pixels used in the encoding of each respective encoder, or used in the decoding of each respective decoder.
When the CPU 20 of the present exemplary embodiment receives a report from the encoder K (K=2, 3, . . . N) stating that the pixel Pi′j (i′=2, . . . R; j′=2, . . . W) has been specified as the target pixel, the CPU 20 reads out from the memory 24 data for (K−1) individual pixels, these being pixels Pi′−K+1
When the CPU 20 of the present exemplary embodiment receives a report from the decoder K+1 (K=1, 2, 3, . . . N−1) stating that the pixel Pi′
Explanation will now be given of encoding (3) executed in each of the encoders 2 to N in the present exemplary embodiment, with reference to
At step 161, determination is made as to whether or not the pixel data of the pixels PL−K+1
When determination is made at step 161 that the pixel data of the pixels PL−K+1
At step 163, the image of the target pixel PL
Explanation will now be given of decoding (3) executed in each of the decoders 2 to N in the present exemplary embodiment, with reference to
At step 261, determination is made as to whether or not the pixel data of the pixels PL−K+1
When it is determined at step 261 that the pixel data of the pixels PL−K+1
At step 263, the image of the target pixel PL
Explanation will now be given of a third exemplary embodiment. In the third exemplary embodiment, as shown in
In the present exemplary embodiment, encoder 1 executes the encoding (1) for encoding the 1st line of the image, encoding the image of the 1st line. However, subsequent lines to the 1st line of the N+1th line, the 2N+1th line, . . . (NX+1: X=1, 2, . . . ), execute the encoding (2) or the encoding (3). The pixel data of the reference pixels used in the encoding (2) or the encoding (3) is, as shown in
In the present exemplary embodiment, as shown in
In the present exemplary embodiment, decoder 1 executes the decoding (1) for decoding the 1st line of the image, decoding the image of the 1st line. However, the subsequent lines to the 1st line of the N+1th line, the 2N+1th line, . . . (NX+1: X=1, 2, . . . ), execute the decoding (2) or the decoding (3). The pixel data of the reference pixels used in the decoding (2) or the decoding (3) is, as shown in
In the present exemplary embodiment, as shown in
Explanation will now be given of a fourth exemplary embodiment. An image processing device 12 of an image forming device 10 of the present exemplary embodiment is, as shown in
As shown in
For example, determination is made as to whether or not the pixel data of the reference pixels required for the encoding, or the decoding, is stored in the shift register, at step 160 and step 260 in the first exemplary embodiment, and at step 161 and step 261 in the second exemplary embodiment. However, in the present exemplary embodiment, for example, when this determination is negative (namely that the pixel data of the reference pixels required for processing is not stored in the shift register) then additional determination is made as to whether or not the FIFO buffer used for speed adjusting in the respective encoder 2 to N, or respective decoders 2 to N, has reached the capacity thereof. Only when determination is made that the FIFO buffer has not reached the capacity thereof does the routine then proceed from step 160 to step 162, from step 260 to step 262, from step 161 to step 163, or from step 261 to step 263.
Note that, as shown in
In each of the above exemplary embodiments explanation has been given of modes in which a control processing program is stored (installed) in advance on the ROM 22. However, the present invention is not limited thereto. For example, application of the present invention may be made to modes such as a mode in which the control processing program is stored in advance on another memory (such as, for example, a HDD (Hard Disk Drive)), a mode in which the control processing program provided is stored on a computer readable storage medium, such as a CD-ROM, DVD-ROM etc., a mode in which the control processing program is distributed via a wired or wireless communication unit, and other such modes.
Number | Date | Country | Kind |
---|---|---|---|
2008-273124 | Oct 2008 | JP | national |