Abstract:
A signal processing system includes means for performing a logic function on a multi-dimensional array of information stored in a memory. Typically, the memory stores two-dimensional video information (pixels), and the logic function is a discrete cosine transform (DCT), or other linear operation. The logic function is performed on both rows and columns of the information. In the prior art, this has required two memory spaces, so that information could be written into one memory while being read out of another memory. In the present invention, a single memory space is used to transpose the information between row and column format, by performing a read-modify-write operation on each memory location in a specified sequence.

Description:
This application is a continuation of application Ser. No. 07/647,325, filed on Jan. 29, 1991, now abandoned. 
    
    
     BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention relates to a system for performing operations on signals. 
     2. Description of the Prior Art 
     The processing of two-dimensional (2-D) signals, as for computer graphics or other video applications, often requires storing a large quantity of information (data) in an array of memory cells. For example, most high definition television (HDTV) receiver designs require storing at least one frame of video information. In most present-day HDTV designs, each frame comprises about 1,000,000 picture elements (pixels). Considering that each pixel typically comprises three color elements that each require eight bits of brightness information, the total number of binary bits that are required to define each frame is about 24 million. Other types of video displays, for example high definition graphics displays, also require a large number of bits to define each frame. Therefore, the memory requirements are a significant part of the cost of each such video receiver or computer terminal. 
     In many video designs, a linear transform operation is performed on the information stored in the video memory array. For example, to provide for a transmission signal having as small a bandwidth as possible, at least one of the proposed HDTV techniques performs a discrete cosine transform (DCT) on each stored frame. A typical system for performing the transform operation is shown in FIG. 4, wherein the stored information is divided into many blocks, each comprising H rows and W columns (and referred to as an &#34;H×W block&#34;). Next, each block (40) is processed in column format (e.g., col. 1, 2 . . . W) by a transform operation (41). In order to transpose the block of information for processing in row format, two memory arrays are typically required. Information is stored in a first memory (43), while simultaneously information is read out of a second memory (44) by rows (e.g., row 1, 2 . . . H). When the next block of video information that has been processed by columns arrives, it will be written into the second memory (44). Simultaneously, the first memory (43) will be read out by rows. In this manner, the information may be processed by the linear transform operation by both columns and rows, as required. This technique is often called &#34;ping-pong&#34; in the art. 
     In the special case wherein the memory array is &#34;square&#34; (i.e., having an equal number of rows and columns), it is known to transpose between column and row formats by simply transposing the row and column portions of the memory address bits. In that technique, first the data is written into the memory array. Then, the address bits are transposed, and the array is read out, which provides the data in the other format (e.g., row format). However, that technique does not work for &#34;non-square&#34; arrays (i.e., having an unequal number of rows and columns). 
     It can thus be seen that in a typical video graphics or HDTV application, large memory arrays are often required for transposition. It would be very advantageous to reduce the amount of memory required in such applications. Still other signal processing techniques require that data be structured in two-dimensional data arrays, and that the data be operated on by rows and by columns. For example, 2-D filtering and 2-D transform operations require that information be supplied in both column and row format. Applications include medical tomography, seismology, and radar analysis, among others. 
     SUMMARY OF THE INVENTION 
     I have invented a technique for signal processing that transposes row and column information in a single memory array. In this technique, the information that is written into the memory array is supplied in a given format (e.g, column-wise). However, the memory array is read out in specified address sequences that provide the information in another format (e.g., row-wise). After each memory location in the array is read out, the information for the next read operation is immediately written into that location. The specified address sequences may be determined using modulus arithmetic based upon the dimensions of the array. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 shows an illustrative embodiment of a memory array and address generator according to the present invention. 
     FIG. 2 shows a logic diagram for determining the sequence of memory addresses. 
     FIG. 3 shows a typical circuit block diagram for implementing the logic of FIG. 2. 
     FIG. 4 shows a typical prior art arrangement of two memory arrays for providing information in both row and column formats. 
    
    
     DETAILED DESCRIPTION 
     The following detailed description relates to a signal processing system that includes means for transposing signals between row and column format with a single memory array. Referring to FIG. 1, a memory array 10 is illustrated wherein each of the data of a H×W block occupies a unique address location inside the memory array of the random access memory (RAM) 10. A read or write operation is selected by line 15. Any one of the address locations may be accessed by supplying the address generated by the address generator (13) to the RAM (10), with a clock signal being supplied by line 14. The row and column decoding techniques, and construction of the memory cells, may be accomplished according to principles that are well known in the art. The memory cells may be of the static, or dynamic variety. There are typically multiple bits (i.e., multiple memory cells) stored in each address location; however, it is alternatively possible that only a single bit (single memory cell) is stored in each location. In the present invention, the address generator is constructed (or controlled by software or firmware) so that the sequence of the memory addresses provides the required transposition between row and column formats, as discussed below. 
     Referring to Table 1 below, an illustrative data array (or a portion thereof, referred to as a &#34;block&#34; herein) includes six array elements. These array elements are labelled a, b, . . . f in lieu of the row and column format shown in FIG. 1. Note that the data array of Table 1 is displayed as it would relate to the spatial arrangement of a 2-D data array (for example, pixels on a video screen), but that the physical locations of the memory cells may be in any convenient pattern, according to the address decoding circuitry used. In fact, a given array of data may be physically stored in multiple integrated circuit chips, if desired. 
     
                       TABLE 1______________________________________DATA ARRAY(COLUMN FORMAT)______________________________________a                c     eb                d     f______________________________________ 
    
     In the illustrative embodiment, the data arrives in column format. That is, each group of six incoming data {a, b, c, d, e, f} always arrive in a sequence that is composed of the first column (a and b), followed by the second column (c and d) and the third column (e and f), etc., as defined by the HDTV or other video system in use. Within each column (for example a and b), the data related to the first row arrives first (a), followed by the data of the second row (b), etc. After transposition, we desire to read the same data array in a sequence that is composed of the first row (a, c, e), followed by the second row (b, d, f), etc. This defines the row format read operation. In the present invention, a read-and-then-write (R&amp;W) operation is performed on each memory address location in such a manner that the incoming data in one format (e.g., column format) are stored for readout in the desired format (e.g., row format) of the stored data. Note that the read-and-then-write operation is performed on a given address location before proceeding to the next location. This type of operation is also referred to as &#34;read-modify-write&#34; in the memory art. 
     For example, referring to Table 2 below, when initializing the memory, there is no information to be read, and the initial &#34;Read &amp; Write Sequence&#34; may conveniently be accomplished in the six memory locations labelled 0, 1, . . . 5. Therefore, the first group of incoming data {A1 , A2, B1, B2, C1, C2} are stored in address locations 0, 1, 2, 3, 4, and 5, respectively. Table 2 shows contents of the memory at locations 0 through 5 after the above-noted six write operations. 
     
                       TABLE 2______________________________________Read &amp; Write Sequence:______________________________________R &amp; W Address:        0     1        2   3      4   5Write Data:  A1    A2       B1  B2     C1  C2______________________________________ 
    
     In order to read out this block of stored information in row format, it is necessary to read the memory block so that the data sequence is A1, B1, C1, A2, B2, C2, as can be seen from the general case of the data set {a, b, c, d, e, f} shown in Table 1. This can be accomplished by accessing the memory locations with the &#34;R&amp;W Address&#34; sequence shown below in Table 3. Furthermore, considering that the next six incoming data are labelled {D1, D2, El, E2, F1, F2}, (which again are arriving in column format), they will necessarily be stored (by virtue of the R&amp;W Address sequence) as shown in the memory array in Table 3: 
     
                       TABLE 3______________________________________Read &amp; Write Sequence:______________________________________R &amp; W Address:        0     2        4   1      3   5Write Data:  D1    D2       E1  E2     F1  F2______________________________________ 
    
     It can be seen that the resulting memory locations of these six data are not in the same order shown in Table 2 any more. Therefore, in order to read out these six data in row format, D1, El, F1, D2, E2, and F2, they are read out by the read &amp; write address sequence shown in Table 4 below. Furthermore, as these six data are being read out, the next six data are arriving (in column format), and are labelled {G1, G2, H1, H2, I1, 12} respectively. Because they are written into the memory block in the same sequence as required by the read &amp; write address sequence, they will be stored in the memory array as shown in Table 4: 
     
                       TABLE 4______________________________________Read &amp; Write Sequence:______________________________________R &amp; W Address:        0     4        3   2      1   5Write Data:  G1    G2       H1  H2     I1  I2______________________________________ 
    
     The next group of six incoming data arriving in column format are labelled {J1, J2, K1, K2, L1, L2 }, respectively. They are treated as shown in Table 5, which results from reading out the previous block in row format, G1, HI, I1, G2, H2, I2: 
     
                       TABLE 5______________________________________Read &amp; Write Sequence:______________________________________R &amp; W Address:        0     3        1   4      2   5Write Data:  J1    J2       K1  K2     L1  L2______________________________________ 
    
     Finally, the next six group of six incoming data are labelled {M1, M2, N1, N2, O1, O2 }, respectively. They are treated as shown in Table 6, which results from reading out the previous block in row format, J1, K1, L1, J2, K2, L2: 
     
                       TABLE 6______________________________________Read &amp; Write Sequence:______________________________________R &amp; W Address:        0      1        2   3     4   5Write Data:  M1     M2       N1  N2    O1  O2______________________________________ 
    
     It can be seen that these last six data are again arranged in the same order as shown for the initial six data (Table 2). Thereafter, succeeding sequences are treated in the manner shown for Tables 2 through 6 above. Hence, information that arrives in column format is transposed into row format by the above procedure. Note that in the above procedure, the address generator (13 in FIG. 1) provides the proper sequences of addresses to perform the column-to-row transformation shown in the Tables. It can be seen from the above Tables that each sequence is an ordered set of all the address locations in a given memory array (or block portion thereof). It can also be seen that each sequence differs from all the preceding sequences, until the memory array returns to its original configuration. The complete ordered set of differing sequences is referred to as a &#34;cycle&#34; herein, and the cycles repeat, as indicated. 
     The above-noted exemplary procedure may be accomplished on any rectangular memory array having dimensions of H and W, where H is the height of the array (i.e., number of rows), and W is the width of the array (i.e., number of columns). The array may be square (H=W), or alternatively rectangular (H≠W). A general logic sequence that provides the proper address sequence may be implemented using modulus arithmetic, where the value of the modulus M is: M=H×W-1. 
     This logic sequence is illustrated in FIG. 2, where: 
     P is the &#34;pointer&#34; that defines the selected memory address for a given read &amp; write operation. For example, P assumes, in various sequences, the values of 0, 1 . . . 5 in the above illustrative embodiment. 
     L is the &#34;address incrementer&#34;, being the amount by which P is incremented from one read &amp; write address to the next. For example, in Table 2 above, L=1, whereas in Table 3, L=2, and in Table 4, L=4, etc. 
     It can be seen that the sequential value of P in the Tables 2 through 6 is calculated using modulus 5 arithmetic (M=3×2-1). That is, when P is incremented by L to a value greater than 5, then 5 is subtracted from the result to determine the new value of P. This is expressed arithmetically in FIG. 2 as: P=P+L mod (M). 
     Note also from FIG. 2 that L itself may be calculated using modulus arithmetic. That is, after completing a given row-to-column transposition sequence (as shown in Table 2 for example), the pointer P returns to the first memory location (P=0), and a new value of L is calculated as follows: L=L×H mod (M). 
     For example, the initial value of L is 1 (Table 2); the next value of L is 1×2 (mod 5) =2 (Table 3), and the following value of L is 2×2 (mod 5)=4 (Table 4), etc. Note that as shown in FIG. 2, when the value of P returns to 0, a new value of L is calculated as described, and a new sequence begins. 
     The foregoing logic sequence may be implemented in circuit form using a logic block diagram as shown in FIG. 3. As shown, the values of P, L, H and M are stored in registers 401, 402, 403 and 404, respectively. The multiplier 405 and modulus M calculator 406 are used to compute the next value of L. The zero detector 407 signals when a given sequence (e.g., a given one of Tables 2 to 6 above) is complete, in which case register 402 is updated according to the above equation. The adder 409 adds the values of P and L, and the modulus arithmetic is performed using subtracter 408 and multiplexer 410. 
     Other implementations of the logic diagram of FIG. 2 are possible. For example, in off-line computations, high-level programming can be used to generate the addresses. Alteratively, a general purpose microprocessor may be used to perform these calculations under the control of software or firmware. In the case wherein dedicated logic is used, as in FIG. 3, the memory array and address generator (including the logic of FIG. 3) are typically formed on the same integrated circuit chip. However, the present invention may be implemented using multiple integrated circuits, as when a microprocessor is used to generate the addresses for a multiplicity of memory chips. Furthermore, while the address sequences may be computed using dedicated circuitry that implement the modulus arithmetic, other techniques for generating the address sequences are possible. For example, a read only memory (ROM) may contain the necessary sequences. Since the sequences form a closed, repetitive cycle (i.e., the sequences repeat themselves after a finite number of 2-D data arrays have been transposed), they may be implemented with still other types of logic circuitry, all of which is included herein. 
     While the above illustrative embodiment has shown a single transposition between row and column format, several such transpositions may be required in a given signal processing system. Hence, several memory arrays may be provided according to the inventive technique. Furthermore, the signal information may be provided in three-dimensional format, by adding a depth (D) dimension to the height (H) and width (W) dimensions shown. In that case, multiple transpositions may be accomplished to construct a three-dimensional array out of multiple two-dimensional array. Note that the designation of &#34;row&#34; and &#34;column&#34; is arbitrary insofar as the present invention is concerned, and the transposition may be accomplished in either direction. While the above illustrative embodiment has shown the general case of a non-square array, use of the present technique with a square array is also possible. Still other applications of the present technique will be apparent to persons of skill in the art.