An assembly and method for binary tree-searched vector quantisation data compression processing

Abstract: Data compression processing is carried out using binary Tree-Searched Vector Quantisation in which the direction of branching at each node of the tree is decided by comparison of an input vector (6) with a single code vector (B(n)) and an associated Scalar value (A).

Description: This invention relates to an apparatus and method for binary Tree-Searched Vector Quantisation (TSVQ) data compression processing. Vector Quantisation (VQ) is a technique for data compression (encoding). Binary Tree-Searched Vector Quantisation (TSVQ) is a particular form of VQ in which each input vector is compared to two vectors in a codebook to determine the direction of branching at each node of the tree (IEEE Transactions on Communications, Vol. 30 no. 2, pages 381-389). Vector Quantisation (VQ) is a well known conventional data compression technique. This will now be described with reference to the accompanying drawings, in which: Figure 1 is a block diagram of the basic structure of a conventional full-search vector quantiser, and Figure 2 is a diagram illustrating a conventional binary tree-searched vector quantiser. As shown in Figure 1 a number of image samples are grouped first to form an input vector Xn. A VQ encoder 1 then compares this vector Xn to entries in a codebook Memory 2, which is available to both encoder 1 and decoder 3. The codebook 2 is searched to find the closest match to the input vector. The index of the closest match vector Un is transmitted to the decoder 3 (see Figure 1) to produce a reconstructed Vector Zn. The decoder 3 simply looks up the closest match vector in the codebook 2 using the transmitted index Un. This method of vector quantisation is known as full search VQ. For a compression of B bits per sample and N samples in the vector, a codebook of 2 BN vectors is required. A full search VQ requires 2 BN vector comparisons. Vector codebooks may be produced by generating an initial codebook and then optimising its performance on a training sequence of data representative of the type of data on which the vector quantiser is to be used. Alternatively, the codebook can be generated by first finding the centroid of the training sequence. The centroid is effectively a single vector which optimally represents the entire training sequence. This vector is split into two by applying a small perturbation to produce the second vector. These two vectors are optimised using the full training sequence, giving two code vectors which optimally describe the training sequence. Each of these code vectors is split to produce a total of four code vectors, which are again optimised using the training sequence. The process of code vector splitting and optimisation is repeated until a codebook of the required size has been created. This method of codebook generation is known as the splitting technique. Various modifications to the basic VQ technique are possible which improve the computational and/or memory requirements of the full search technique. One of these is the binary Tree Searched Vector Quantisation (TSVQ). TSVQ arises naturally from the splitting method of codebook generation. Conventionally a sample vector is compared to two codebook vectors (those that were generated after splitting and optimising the initial training sequence centroid). Depending on the outcome, one of two branches of the encoding tree are taken (see Figure 2). The sample vector is then compared to a further pair of codebook vectors at the next node of the tree. These code vectors are those that were generated in the second level of codebook generation. Again, one of two branches of the encoding tree are taken. This process continues until the bottom level of the tree is reached where the code vector index is transmitted. Tree-searched VQ is more effective than full-search VQ. It requires fewer vector comparisons, that is BN vector comparisons compared to 2 BN for the full search method. However, the tree-searched VQ is non-optimal and can only be applied to appropriately structured codebooks. Additionally the conventional tree searched vector quantisation still requires a relatively large amount of processing power, some six comparison operations at each node stage. Tree-searched VQ also requires a larger vector codebook memory than conventional full-search VQ. There is thus a need for a generally improved method and assembly for binary Tree-searched Vector Quantisation data compression processing which preferably requires less processing power and/or requires less memory capacity than conventional binary Tree-Searched Vector Quantisation techniques. According to the present invention there is provided a binary Tree-Searched Vector Quantisation data compression processing as defined in appended claim 1. Preferably the comparing means is a computation unit operable to add the inner product of a source vector with the code vector, at a particular node, to the associated scalar value for that node and then test the result, taking one branch of the tree if the result is negative and the other branch of the tree if it is positive or zero. Alternatively the comparing means is a computation unit operable to add the scalar value, of a particular node, to the inner product of a source vector with the code vector, for that node and then test the result, taking one branch of the tree if the result is negative and the other branch of the tree if it is positive or zero. As a further alternative the comparing means is a computation unit operable to calculate the inner product of a source vector with the code vector, at a particular node and then compare the result with the scalar value for that node, taking one branch of the tree if the scalar value is greater than the inner product and the other branch of the tree if the scalar value is the same or less than the inner product. Conveniently the computation unit is a single multiplier-accumulator unit. Alternatively the computation unit is a plurality of multiplier-accumulator units. Advantageously the computation unit is a systolic array processor, or a wavefront array processor. Preferably the vector memory is a banked memory operable so that a new input vector can be loaded while the previous input vector is being processed. Conveniently the vector codebook memory is a Random Access Memory (RAM) or a Read Only Memory (ROM). Advantageously the assembly includes a sample counter for accessing the input samples in the vector memory and for accessing elements of the code vector in the vector codebook memory. Advantageously the assembly includes a sample counter for accessing the input samples in the vector memory and for accessing elements of the code vector in the vector codebook memory. Preferably the assembly includes a level counter operable to access the relevant areas of the vector codebook memory which correspond to the different levels of the Tree-Searched Vector Quantisation. Conveniently the assembly includes a code index register operable to hold a current value of a code index as it is being computed by the means for comparing input vectors, and codebook vectors, and to direct access to appropriate code vectors in the codebook memory. The assembly may also include a system controller for directing the operation of the assembly. According to a further aspect of the present invention there is provided a method of data compression processing using binary Tree-Searched Vector Quantisation in which the direction of branching at each node of the tree is decided by comparison of an input vector with a single code vector and an associated scalar value. For a better understanding of the present invention and to show how the same may be carried into effect, reference will now be made, by way of example, to the accompanying drawings, in which: Figure 3 is a block diagram of a binary Tree-Searched Vector Quantisation data compression processing assembly according to a first embodiment of the present invention. With reference to the accompanying drawings, consider a conventional tree-searched vector quantiser which has N samples per vector and a codebook size of 2 BN where B is the number of bits per sample. There are BN stages required for the corresponding tree-searched vector quantiser. At each stage the input vector must be compared to the possible code vectors to determine which branch of the tree to follow in deriving the final code vector index. So, a total of 2.BN vector comparisons are required. A vector comparison is normally a sum of squares of differences, given by where c(n) is a codebook vector and s(n) is the input vector. At each stage the problem is to determine which of two code vectors most closely matches the input vector. If c₁(n) is one code vector and c₂(n) is the other, then c₁(n) is the chosen vector if To evaluate relationship (2) directly requires 2N subtractions, 2N multiplications, 2(N-1) additions and one comparison. A total of approximately 6N operations per vector per stage of the TSVQ. That is equivalent to 6BN operations per sample for the entire TSVQ. Rearranging relationship (2) produces which can be expanded to and Now Where A is a constant (scalar value) for any given pair of code vectors, i.e. any node of the TSVQ. Also the code vector difference c₂(n) - c₁(n) may be replaced by another vector b(n) = 2[c₂(n) - c₁(n)] Substituting relationships (6) and (7) in relationship (5) produces the comparison The binary Tree-Searched Vector Quantisation data compression processing assembly of the present invention, generally referenced at 4 in Figure 3 of the accompanying drawings is basically an encoder having a vector memory 5 for receiving and storing input samples 6 forming an input vector, a vector codebook memory 7 (preferably a Random Access Memory) for holding entries each in the form of a single code vector B(n) and an associated scalar value A, and means for comparing the input vector with said single code vector B(n) and scalar value A to decide the direction of branching at each node of the tree. Thus in the Tree-searched Vector Quantisation (TSVQ) encoder or assembly 4 the two conventional code vectors (c₁(n) and c₂(n)) at each node are replaced by one code vector (e.g. B(n) = 2[c₂(n) - c₁(n)]) and a scalar value (e.g. This means that with the method of the invention the direction of branching at each node of the tree is decided by comparison of an input vector with a single code vector and an associated scalar value. The comparing means preferably is a computation unit operable to add the inner product (also known as the dot product) of a source vector with the codebook vector B(n), at a particular node, to the scalar value for that node (i.e. and then test the result, taking one branch of the tree (as in Figure 2) if the result is negative and the other branch of the tree if it is positive or zero. The inner product is given by the sum of products s(n)B(n) = s 1 b 1 + s 2 b 2 + ---- + s n b n where s₁, s₂, --, s n are the samples of vector s and b₁, b₂, --, b n are the samples of vector B. Alternatively the comparing means may be a computation unit operable to add the scalar value, of a particular node, to the inner product of a source vector with the codebook vector B(n), for that node (i.e. and then test the result, taking one branch of the tree if the result is negative and the other branch of the tree if it is positive or zero. In yet another alternative the comparing means is a computation unit operable to calculate the inner product of the source vector with the codebook vector B(n), at a particular node (i.e. and then compare the result with the scalar value, A, for that node, taking one branch of the tree if A is greater than the inner product and the other branch of the tree if it is the same or less than the inner product. The computation unit preferably is a single multiplier-accumulator unit generally indicated at 8. Alternatively the computation unit may be a plurality of such multiplier-accumulator units 8, a systolic array processor or a wavefront array processor. With the assembly 1 of the invention the comparison may be achieved using the multiplier-accumulator unit 8 structure, having a multiplier 8a and an accumulator, which comprises an adder 8b, a selector 8c and a register 8d, by first pre-loading the accumulator register 8d with A and then accumulating into it the sum of s(n).B(n) over the entire N samples of the vector, that is the inner product of the source vector S(n) and the codebook vector B(n). The sign-bit of the accumulator is then tested to see if the result is negative (<0) in which case the TSVQ branch corresponding to code vector c₁(n) is chosen. Each node of the TSVQ now requires N multiplications and N additions, that is 2N operations - one third of the 6N operations required for the direct TSVQ implementation. This corresponds to N multiply-accumulate operations per vector which is equivalent to BN multiply-accumulate operations per sample. It should also be noted that the storage space or memory 7 required for the codebook has been reduced. With the assembly 1 the input samples 6 forming a vector are placed in the vector memory 5. The vector memory 5 may be a banked memory so that a new vector may be loaded while the previous vector is being processed. The vector codebook member 7 preferably is a RAM but may be a Read Only Memory (ROM). Each entry in the codebook comprises the scalar constant A and the vector B(n). The elements of the vector B(n) are accessed by a sample counter 9 which also accesses the samples in the vector memory 5. A level counter 10 is used to access the relevant areas of the codebook which correspond to the different levels of the TSVQ and a code index register 11 is used to hold the current value of the code index (as it is being computed by the TSVQ) which is also used to direct access of the appropriate code vectors in the code book. Alternatively, the level counter and code index register may be combined as one address generator. The multiplier-accumulator has preload via the selector 8c. A system controller 12 forms the remaining part of the TSVQ processing element. The system controller 12 directs the operation of the assembly 1. Once a new vector has been loaded into the vector memory 5 the code index register 11, sample counter 9 and level counter 10 are reset so that the root vector of the codebook is addressed. The corresponding constant A value is loaded into the accumulator register 8d. Then the sample counter 9 accesses each vector sample and codebook vector element B(n) in turn. These are multiplied together by the multiplier 8a and accumulated by the accumulator components 8b, 8c and 8d. When the last sample of the vector is reached the sign-bit 14 of the accumulator register 8d is checked by the system controller 12 and the code index register 11 adjusted accordingly. The sample counter 9 is reset, the level counter 10 is incremented and the entire vector multiply-accumulate operation repeated, this time for the selected second level node. Operation continues in this way until all levels of the TSVQ have been traversed. The code index output 13 is then read out of the code index register 11 and the next sample vector 6 processed. The system controller 12 includes facilities for sign bit 14, multiplier/accumulator control 15, Vector Memory control 16, sample counter control 17, level counter control 18 and Code Index Control 19.

Claims: A binary Tree-Searched Vector Quantisation data compression processing apparatus for encoding input vectors (s(n)) as codebook vectors (c(n)) for transmission of the respective indices of the codebook vectors to a decoder to produce reconstructed vectors corresponding to the codebook vectors, characterised by the provision of a vector memory (5) for receiving and storing input samples forming an input vector, a vector memory (7) for holding entries each in the form of a single vector (B(n)) related to the difference between two codebook vectors (c(n)) and an associated scalar value (A), and means (8) for comparing the input vector (s(n)) with said single difference vector (B(n)) and associated scalar value (A) to decide the direction of branching at each node of the tree. An apparatus according to Claim 1, in which the comparing means (8) is a computation unit operable to add the inner product of an input vector (s(n)) with the difference vector (B(n)), at a particular node, to the associated scalar value (A) for that node and then test the result, taking one branch of the tree if the result is negative and the other branch of the tree if it is positive or zero. An apparatus according to Claim 1, in which the comparing means (8) is a computation unit operable to add the scalar value (A), of a particular node, to the inner product of an input vector (s(n)) with the difference vector (B(n)), for that node and then test the result, taking one branch of the tree if the result is negative and the other branch of the tree if it is positive or zero. An apparatus according to Claim 1, in which the comparing means (8) is a computation unit operable to calculate the inner product of an input vector (s(n)) with the code vector (B(n)), at a particular node and then compare the result with the scalar value (A) for that node, taking one branch of the tree if the scalar value (A) is greater than the inner product and the other branch of the tree if the scalar value is the same or less than the inner product. An apparatus according to any one of Claims 2 to 4, in which the computation unit (8) is a single multiplier-accumulator unit. An apparatus according to any one of Claims 2 to 4, in which the computation unit (8) is a plurality of multiplier-accumulator units. An apparatus according to any one of Claims 2 to 4, in which the computation unit (8) is a systolic array processor. An apparatus according to any one of Claims 2 to 4, in which the computation unit (8) is a wavefront array processor. An apparatus according to any one of Claims 1 to 8, in which the vector memory (5) is a banked memory operable so that a new input vector (6) can be loaded while the previous input vector (6) is being processed. An apparatus according to any one of Claims 1 to 9, in which the difference vector memory (7) is a Random Access Memory (RAM) or a Read Only Memory (ROM). An apparatus according to any one of claims 1 to 10, in which there is provided a sample counter (9) for accessing the input samples (6) in the input Vector memory (5) and for accessing elements of the difference vector (B(n)) in the difference vector memory (7). An apparatus according to any one of Claims 1 to 11, in which there is provided a level counter (10) operable to access the relevant areas of the difference vector memory (7) which correspond to the different levels of the Tree-Searched Vector Quantisation. An apparatus according to any one of Claims 1 to 12, in which there is provided a code index register (11) operable to hold a current value of a code index as it is being computed by the means (8) for comparing input vectors (s(n)), and difference vectors (B(n)), and to direct access to appropriate difference vectors (B(n)) in the difference vector memory (7). An apparatus according to any one of Claims 11, 12 and 13 in which there is provided a system controller (12) for directing the operation of the apparatus (4). A method of data compression processing using binary Tree-Searched Vector Quantisation in which input vectors (s(n)) are encoded as codebook vectors (c(n)) for transmission of the respective indices of the codebook vectors to a decoder to produce reconstructed vectors corresponding to the codebook vectors, characterised by the steps of receiving and storing input samples forming a vector input (s(n)), of comparing the input vector with a single difference vector (B(n)) related to the difference between two codebook vectors (c(n)) and with an associated scalar value (A), and of deciding the direction of branching at each node of the tree.

Inventors: PARKES STEPHEN MAXWELL, PARKES, STEPHEN MAXWELL
Applicants: MATRA MARCONI SPACE UK LTD, MATRA MARCONI SPACE UK LIMITED
Application year: 1991
Main classification: H03M7
IPC codes: G10L19, G06T9, H04N7, H03M7