Circuit for rotating a ditigal image

Abstract: A circuit for rotating an image by reading it into and then out from a page buffer, where all transfers, whether by column or row, are performed substantially in fast page mode. RAM devices typically have a fast page mode when the same row address is maintained from one access to the next. in this invention the column address lines of the RAM devices (14) are connected to the 5 or 6 least significant bits (AO-15,A13-A17) of the vertical and horizontal address counters of the image, and the row address lines are connected to the remaining most significant bits (A6-A12,A18-A21) of the vertical and horizontal counters of the image. Therefore, whether the system is accessing the image data in the vertical or horizontal direction, there will be at least 31 fast page mode accesses for every one slow access, and the average speed of transfers in either direction will approximate the fast page mode speed.

Description: The present invention relates to a circuit for addressing a random access memory device having x address lines divided into column address lines and row address lines according to the preamble part of claim 1. The basic circuit has been described in EP-A-0,433,645. The basic system of rotating a block of an image requires first that each line of each block of the image is circularly shifted by the line number within the block and then stored in a buffer memory. For example, line 0 is circularly shifted 0 bits, line 1 is circularly shifted 1 bit, etc. At this point the image can either be read out of the buffer and not rotated at all, or read out in such a way that the final image is rotated by any multiple of 90 degrees, including all mirror images. To get back the original orientation, the image is read out one line at a time, and is simply shifted back to its original form. To get a rotated image, the image block is read out from the buffer along diagonal lines, and circularly shifted again. When reading in image data to the buffer, the fast page mode can be used. This is a feature designed into memory devices, and provides that the data can be stored or read out at a higher speed provided that the row address does not change from one access to the next. For example, when reading words into a buffer, assume that the data is read into row 0 col 0, row 0 col 1, row 0 col 2, etc. Since the row address does not change, the fast page mode can be used, and the total data transfer can be done in a fraction of the time that it would otherwise take. The column addresses need not be sequential, as long as the row address is constant. Similarly, to take data out of the buffer in non-rotated form, the procedure is simply the reverse of the loading procedure, and that can also be handled in the fast page mode. A problem occurs when reading from the buffer in the rotation mode. Here the bits are taken from row 0 col 0, then row 1 col 0, then row 2 col 0, etc. Here the fast page mode cannot be used because the row address is different for each read, and therefore the production of a rotated image will take significantly longer than the production of one that is not rotated. There is a need, therefore, for an improved circuit that will produce both rotated and unrotated images at speeds approximating that of the fast page mode. EP-A-0 276 110 discloses a semiconductor memory device with an address scramble unit and a multidirection data selection unit in which a continuous sixteen bit data selection of a raster-type scanning on all of the X-, Y- and S-direction accesses can be made. The address scramble unit converts an external address consisting of an external column address and external row address into an internal directional address consisting of a row address, a segment designation address and a segment internal address. At a typical printer, as an image is being received, a word counter keeps track of the number of words, and will finally contain the total count of words in the image. For example, when a rectangular image is being received with its scan lines in the vertical direction, typically the least significant half of the counter is used to address the image in the vertical direction and the most significant half of the counter to address the image in the horizontal direction. This image is temporarily stored in a page buffer comprising memory devices having column and row address lines. Typically, the least significant half of the image counter, which addresses the image in the vertical direction, is connected to the column address lines of the memory devices, and the most significant half of the image counter, which addresses the image in horizontal direction, to the row address lines of the memory device. The result is that if the data is read out from the buffer in the vertical direction (the data is read out from the buffer in the same way as it was stored) fast page mode can be used but if the data is read out in the horizontal direction (the data is read out from the buffer in a 90 degree rotated direction) the fast page mode cannot be used. It is the object of the present invention to provide a circuit allowing fast memory access in vertical and horizontal direction. This object is solved by the subject matter of claim 1. According to an aspect of the present invention there is provided a circuit for addressing one bit at a time in a random access memory device having x address lines divided into column address lines and row address lines, the circuit comprising: an x bit counter having y least significant bits, z most significant bits, and n intermediate bits, where y + z + n = x, and x, y, z and n are positive integers, a first multiplexer connected to the counter and having A and B inputs and an output, the A and B inputs being connected to the counter with the A input being coupled to the y least significant bits and the B input being coupled to the z most significant bits; a second multiplexer connected to the counter and having A' and B' inputs and an output, the A' and B' inputs being connected to the counter with the A' input being coupled to the z most significant bits and the B' input being coupled to the y least significant bits; a register having y + z + n input and output lines wherein the y least significant of the input lines thereof are coupled to the output of the first multiplexer, the n intermediate input lines thereof are coupled to the n intermediate bits of the counter and the z most significant of the input lines thereof are coupled to the output of the second multiplexer, wherein the multiplexers in a first state couple the A and A' inputs to the register and in a second state couple the B and B', inputs to the register; characterised in that the y least significant bit output lines of the register are divided into lower least significant bit output lines and upper least significant bit output lines, the z most significant bit output lines of the register are divided into lower most significant bit output lines and upper most significant bit output lines, said lower least significant bit output lines and said lower most significant bit output lines being coupled to the column address lines of the random access memory device, said upper least significant bit output lines, the intermediate bit output lines and said upper most significant bit output lines of the register being coupled to the row address lines of the random access memory device. To use a numerical example, assume a prior art buffer memory which uses 16 devices to store 512 words (16 bits per word) by 8K lines. In this case the word counter, which uses 22 bits to count the input words, will use the least significant 9 bits of the counter to address the image in the vertical direction, and the most significant 13 bits of the counter to address the image in the horizontal direction. Typically, the least significant half of the image counter is connected to the column address lines of the memory device, and the other half to the row address lines. Thus, fast page mode can only be used in one direction, when the data is accessed in the vertical direction. A preferred embodiment of the present invention uses the least significant 6 bits of the counter to address the image in the vertical direction and the least significant 5 bits of the counter to address the image in the horizontal direction as column address inputs of the memory devices of the page buffer. Similarly, all of the remaining most significant bits of the addresses for the vertical direction and horizontal direction are connected to the row address lines of the memory devices of the page buffer. Now, when data is stored or read out in vertical scanlines (no 90 degree rotation), there can be 63 readouts (for 6 address lines) in the fast page mode before there will be a bit change in the row address of the memory device, and one slow page mode readout will be necessary for that one read. Then the system goes back to another 63 fast reads. Similarly, if the memory is being read out in the horizontal direction (90 degree rotation), there can be 31 readouts (for 5 address lines) in the fast page mode before there will be a bit change in row address, and one slow page mode readout will be necessary for that one read. Then the system goes back to another 31 fast reads. In either case the average readout speed will be almost equal to the fast mode speed. In this way, speeds approaching the fast page mode are available whether the read out is in the vertical or horizontal direction of the image, and therefore whether the image is being rotated or not. A circuit in accordance with the invention will now be described, by way of example, with reference to the accompanying drawings, in which:- Fig 1 is a diagram of the original image. Fig 2 is shows how the image is loaded into the buffer memory in the prior art. Fig 3 is the prior art method of addressing the page buffer during loading. Fig 4 is the arrangement of data in the page buffer. Fig 5 is the prior art method of addressing the page buffer while reading out a rotated image. Fig 6 is a simplified schematic diagram of the prior art circuit. Fig 7 is a simplified schematic diagram of the circuit of this invention. The original image is shown in Fig 1. Each scanline is made up of 512 words of 16 bits each, for a total of 8K bits, and there are 8K scan lines in the page. In Fig 1, the first scanline is shown in black and the second scanline is shown as crosshatched. Thus there are 8K vertical rows and 512 horizontal columns in the image. These are then grouped into 16 by 16 bit blocks as shown. Fig 2 shows how these lines are loaded into a page buffer arranged according to the prior art. Each scan line is shifted if necessary, and then loaded into 512 words of the buffer as shown. The result is one row for each scan line. To read out in unrotated form, the data is read out as it was stored and then shifted back to reproduce the original image. This prior art system for loading or reading is shown in Figs 3 and 4. The 8K by 8K buffer is segmented into 16 bit words and there are a total of 4,194,304 words, which requires a 22 bit word counter. The least significant 9 lines, C0 through C8, count the words in each vertical line of blocks in the image (512), bits C9 - C12 count the row lines within the block (16x16 bit block) and the remaining 9 address lines C13 - C21, count the blocks in the horizontal direction of the image . Counter bits, C9-C12, are identical in value to the number of bits that the data must be shifted before loading, and therefore are used to control the shifter as well as address the buffer. During read-out of an unrotated image these counter bits are used as shown in Fig 3. C0 - C8 are connected to A0 - A8 of the memory devices and used to address the blocks in the vertical direction, C13 - C21 are connected to A13 - A21 of the memory devices and used to address the blocks in the horizontal direction, and C9 - C12 are connected to A9 - A12 and used to address the lines within the 16-blocks and also to control the shifter to shift the data back to its original position. Fig 4 shows the location of data in page buffer. As shown, the image is divided up into 16 line (in the horizontal direction) by sixteen bit (per word) blocks. For the first block, address lines A0 - A8 and A13 - A21 are all 0. For the second block in the scan line direction, the address lines A0 - A8 equal 1 and the address lines A13 - A21 equal 0. Within the block, individual words are addressed by address lines A9 - A12. During loading or reading of a non-rotated image in the prior art, each entire scan line of 512 words is completely read in or out before the next line is started. For a rotated image, the read-in is identical, but on read-out, the process reads out the same diagonal line from every block in the horizontal line of blocks before going on to the next diagonal line in all of the blocks in the same horizontal line, until all the diagonal lines in the 16-bit block are accessed. Then, the process reads out the diagonal lines from every block in the next set of 16-bit blocks in the horizontal direction. Therefore, for each random access memory (RAM), each consecutive read comes from a different row, and the slow page mode must be used. This entire prior art addressing system is shown in Fig 5. The addressing lines A13 - A21 of the memory devices for addressing the 16-bit blocks in the horizontal direction are taken from the counter C0 - C8, and lines A0 - A8 of the memory devices to address the 16-bit blocks in the vertical direction are taken from the counter C13 - C21. Then, for each bit within the block, the address lines A9 - A12 to each RAM device are a function of counter bits C9 - C12. Here the process is to read out the same diagonal line, as defined by bits 9 - 12, in each of the 512 blocks in the horizontal direction before going on to the next diagonal line. Fig 6 is a circuit of the prior art addressing arrangement shown in Figs 3 and 5. At this point is should be noted that while the image is 512 words by 8K bits, the memory is configured as 2K by 2K, which requires 11 address lines for row and column addresses. Therefore, for non-rotated images, bits C0 - C10 are used for column addressing and C11 - 21 are used for the rows. For rotated images, the multiplexers 12, 13, as shown, couple bits C0 - C8 to address lines A13 - A21 and C13 - C21 to address lines A0 - A8. This effectively switches the read out from along the vertical direction to along the horizontal direction. However, as shown, the central 4 bits remain unchanged. These bits determine the line within the block, and this number does not change whether the read out is along a row or column. As described above, the read out for rotated images is in the horizontal direction (the counter increments the row addresses, A13 - A21, once for each readout), and therefore must proceed at the slow page mode speed. Fig 7 is the schematic diagram of the present invention. Here, the arrangement of the counter 10 and multiplexers 12, 13 is identical to that of the prior art. However, the column address lines to the RAM are taken from bits A0 - A5 and A13 - A17 of the address line register 11 which are the least significant bits of the row and column counters. Therefore, there can be either 31 or 63 readouts along a row or column in the fast page mode before a slow page mode read out is required. In terms of performance, if data can be accessed at the rate of 200 megabits/second (Mbits/sec) for an unrotated image using the fast page mode and 80 Mbits/sec for a rotated image not using the fast page mode, then, with this invention, data can be accessed at 191.3 Mbits/sec for an unrotated image, and at 183.8 Mbits/sec for a rotated image. Thus, with this invention, speeds approaching the fast page mode are available under all circumstances.

Claims: A circuit for addressing one bit at a time in a random access memory device (14) having x address lines divided into column address lines and row address lines, the circuit comprising: an x bit counter (10) having y least significant bits, z most significant bits, and n intermediate bits, where y + z + n = x, and x, y, z and n are positive integers, a first multiplexer (12) connected to the counter (10) and having A and B inputs and an output, the A and B inputs being connected to the counter (10) with the A input being coupled to the y least significant bits and the B input being coupled to the z most significant bits; a second multiplexer (13) connected to the counter (10) and having A' and B' inputs and an output, the A' and B' inputs being connected to the counter (10) with the A' input being coupled to the z most significant bits and the B' input being coupled to the y least significant bits; a register (11) having y + z + n input and output lines wherein the y least significant of the input lines (AO - A8) thereof are coupled to the output of the first multiplexer (12), the n intermediate input lines (A9 - A12) thereof are coupled to the n intermediate bits (C9 - C12) of the counter (10) and the z most significant of the input lines (A13 - A21) thereof are coupled to the output of the second multiplexer (13), wherein the multiplexers (12, 13) in a first state couple the A and A' inputs to the register (11) and in a second state couple the B and B', inputs to the register (11); characterised in that the y least significant bit (AO - A8) output lines of the register (11) are divided into lower least significant bit (A0 - A5) output lines and upper least significant bit (A6 - A8) output lines, the z most significant bit (A13 - A21) output lines of the register (11) are divided into lower most significant bit (A13 - A17) output lines and upper most significant bit (A18 - A21) output lines, said lower least significant bit (A0 - A5) output lines and said lower most significant bit (A13 - A17) output lines being coupled to the column address lines of the random access memory device (14), said upper least significant bit (A6 - A8) output lines, the intermediate bit (A9 - A12) output lines and said upper most significant bit (A18 - A21) output lines of the register (11) being coupled to the row address lines of the random access memory device (14).

Inventors: KADAKIA VINOD K, KANG CHRISTINE H, KADAKIA, VINOD K., KANG, CHRISTINE H.
Applicants: XEROX CORP, XEROX CORPORATION
Application year: 1993
Main classification: G06F12
IPC codes: G06T1, H04N1, G11C11, G06F12, G09G5, G11C7, G06T3