linear predictive coding is a common technique in speech coding , whereby correlations between samples are exploited to improve coding efficiency . the output of an lpc synthesis filter is subtracted from a speech input signal to produce an lpc residual signal . the output of an ltp synthesis filter is subtracted from the lpc residual signal to create an ltp residual signal . the ltp residual signal is quantized to produce the excitation signal . the quantizer can be a scalar quantizer , a vector quantizer , an algebraic codebook quantizer , or any other suitable quantizer . the output of a long term predictor is added to the excitation signal , which creates an lpc excitation signal . the lpc excitation signal is input to a long - term predictor , which is , e . g . a strictly causal moving average ( ma ) filter controlled by the pitch lag and quantized ltp coefficients . the output of a short term predictor is added to the lpc excitation signal , which creates the quantized output signal . the quantized output signal is input to the short - term predictor , which is a strictly causal ma filter controlled by the quantized lpc coefficients . the described embodiments illustrate a new encoding technique for the excitation quantization coefficients prior to transmission . the technique can also be used to encode other coefficients used in speech encoding , or in any situation where a block of values is to be encoded . reference will now be made to fig3 to explain the technique . the signal of excitation quantization indices produced by the scalar quantizer is input to the arithmetic coder 518 . therein , an entropy coding takes place as described herein . the frame of l * m quantization indices is split into m blocks 109 0 . . . 109 m of l quantization indices each . each block is sequentially and independently encoded . in the preferred embodiments l = 16 and m = 20 . for each block , the quantization indices q ( n ) are converted into signs s ( n ) and absolute values u ( n ). the absolute values are summed to produce a radius k if the radius k exceeds a maximum radius value of k max = 20 , one or more absolute values u ( n ) are reduced such that the radius k becomes 20 . the radius k for each block is arithmetically encoded using a table of probability values located amongst a plurality of such tables stored in rom 320 . that is , a fixed probability table from the rom 320 is passed to an arithmetic encoder 322 which carries out an arithmetic encoding process of the total sum k of absolute values based on the probability values in the selected probability table . arithmetic encoding is known — see for example http :// en . wikipedia . org / wiki / arithmetic_coding . the details of the encoding are not important — what is important is the fact that the encoding is based on a probability table . the result of the encoding is passed to a temporary store 324 . in some cases , the radius k is fixed , in which case there is no need to determine it , or encode it . the fixed value for the radius k would in that case be known at the encoder and decoder . next , the distribution of absolute values over the block is encoded by recursively splitting the parent block block parent in two equal - sized subblocks , starting with the block of 16 absolute values . for each split , a probability table p is selected from the plurality of probability tables p 1 . . . p i based on the length l parent of the parent block and the sum of absolute values k parent in the parent block . each probability table p stores the probability of having a sum of absolute values k sub in the block , for values of k sub from 0 to k parent . the sum of absolute values in the first subblock is arithmetically encoded in encoder 322 using the selected probability table . the result updates the result in the temporary store 324 . this is carried out recursively , each time updating the stored result . whenever a subblock is encountered for which the sum of absolute values is zero , that subblock is not split further and no further arithmetic encodings are done for that subblock . when the blocks have been split to this point , the final result is an encoded bitstream ready for transmission . fig3 illustrates the method diagrammatically , where p 1 , p 2 . . . p i are probability tables , with p i denoting a selected table for each subblock after each split . since there are 4 different parent block lengths , 16 , 8 , 4 , and 2 , and the maximum radius kmax is 20 , a total of 4 × 20 = 80 probability tables p are stored . for each nonzero absolute value in the block , the sign value s ( n ) is arithmetically encoded using a table of two probability values , one for a positive sign and one for a negative sign . the probability tables can be created through an off - line training process . the training process runs an encoder over a training database of speech signals , and stores each occurrence of accessing a probability table element . after running the database , the frequencies of probability table element accesses are computed and normalized for each table to produce the probability values for the table elements . entropy coding based on a likelihood table for splitting a given number of unit pulses over two groups of samples is novel . recursive splitting of the parent blocks into pairs of subblocks , and arithmetic encoding of the numbers of unit pulses in each subblock given the number of unit pulses in the parent block allows for an efficient encoding of the distribution of unit pulses over the block of samples . for a block length of l samples , a total number of l − 1 splits are required to uniquely indicate the number of unit pulses , i . e ., amplitude value , for each sample in the block . for each split and each number of unit pulses in the parent block k , an arithmetic coding probability table p of size k + 1 is used . for a maximum but otherwise unconstrained radius ( total number of unit pulses in a block ) of k max , a total number of ( l − 1 ) k max tables is used , with an average number of ( k max + 1 )/ 2 elements per table . the total storage is thus approximately l k max 2 / 2 elements . if the radius is fixed to a value k ( e . g . k = 20 as defined above ), then the total storage is reduced to approximately l k / 2 . the probability tables p can be stored in rom 320 . the encoding is efficient as long as two conditions are met . the first condition is that the actual probability distribution of the sample values match that of the arithmetic coding tables . this can be ensured by constructing the arithmetic coding tables through a training procedure as described above . alternatively , it is possible to create the arithmetic coding tables by numerically integrating a certain probability distribution . the second condition is that the sample values are statistically independent . the quantization of a whitened residual signal mostly ensures this , by removing correlations between the sample values . if all samples in the block have identical probability distributions , then a reduction in table size is obtained by using the same arithmetic coding table for splits with the same subblock sizes . for instance , when the input block has a number l = 2 m , then splitting parents blocks in two equal halves results in m different sizes for the subblock splits , and thus only m = 2 log ( l ) arithmetic coding tables are required . in that case the total table size is approximately 2 log ( l ) k max 2 / 2 elements . if the radius is fixed to a value k , then the total rom storage is reduced to approximately 2 log ( l ) k / 2 . when coding at low bit rates , many of the quantization indices have a value of zero . this enables a computational optimization , where the recursive entropy encoding in the encoder and decoding in the decoder is stopped as soon as a subblock is encountered for which the sum of absolute values is zero , without further splitting that subblock . an alternative condition for stopping further splitting is that all subblocks have a length of one . fig4 is a schematic representation of a frame of quantization indices prior to and after encoding . the frame is divided into 16 subframes 109 0 . . . 109 15 for encoding as described above . the encoding process generates a bitstream 106 ′ which has 16 encoded streams which represent the subframes 109 and which can be transmitted to a decoder . an example of an encoder 500 for implementing the present invention is now described in relation to fig5 . the encoder 500 comprises a high - pass filter 502 , a linear predictive coding ( lpc ) analysis block 504 , a first vector quantizer 506 , an open - loop pitch analysis block 508 , a long - term prediction ( ltp ) analysis block 510 , a second vector quantizer 512 , a noise shaping analysis block 514 , a noise shaping quantizer 516 , and an arithmetic encoding block 518 . the high pass filter 502 has an input arranged to receive an input speech signal from an input device such as a microphone , and an output coupled to inputs of the lpc analysis block 504 , noise shaping analysis block 514 and noise shaping quantizer 516 . the lpc analysis block has an output coupled to an input of the first vector quantizer 506 , and the first vector quantizer 506 has outputs coupled to inputs of the arithmetic encoding block 518 and noise shaping quantizer 516 . the lpc analysis block 504 has outputs coupled to inputs of the open - loop pitch analysis block 508 and the ltp analysis block 510 . the ltp analysis block 510 has an output coupled to an input of the second vector quantizer 512 , and the second vector quantizer 512 has outputs coupled to inputs of the arithmetic encoding block 518 and noise shaping quantizer 516 . the open - loop pitch analysis block 508 has outputs coupled to inputs of the ltp 510 analysis block 510 and the noise shaping analysis block 514 . the noise shaping analysis block 514 has outputs coupled to inputs of the arithmetic encoding block 518 and the noise shaping quantizer 516 . the noise shaping quantizer 516 has an output coupled to an input of the arithmetic encoding block 518 . the arithmetic encoding block 518 is arranged to produce an output bitstream based on its inputs , for transmission from an output device such as a wired modem or wireless transceiver . in operation , the encoder processes a speech input signal sampled at 16 khz in frames of 20 milliseconds , with some of the processing done in subframes of 5 milliseconds . the output bitstream payload contains arithmetically encoded parameters , and has a bitrate that varies depending on a quality setting provided to the encoder and on the complexity and perceptual importance of the input signal . the speech input signal is input to the high - pass filter 504 to remove frequencies below 80 hz which contain almost no speech energy and may contain noise that can be detrimental to the coding efficiency and cause artifacts in the decoded output signal . the high - pass filter 504 is preferably a second order auto - regressive moving average ( arma ) filter . the high - pass filtered input x hp is input to the linear prediction coding ( lpc ) analysis block 504 , which calculates 16 lpc coefficients a i using the covariance method which minimizes the energy of the lpc residual r lpc : where n is the sample number . the lpc coefficients are used with an lpc analysis filter to create the lpc residual . the lpc coefficients are transformed to a line spectral frequency ( lsf ) vector . the lsfs are quantized using the first vector quantizer 506 , a multi - stage vector quantizer ( msvq ) with 10 stages , producing 10 lsf indices that together represent the quantized lsfs . the quantized lsfs are transformed back to produce the quantized lpc coefficients for use in the noise shaping quantizer 516 . the lpc residual is input to the open loop pitch analysis block 508 , producing one pitch lag for every 5 millisecond subframe , i . e ., four pitch lags per frame . the pitch lags are chosen between 32 and 288 samples , corresponding to pitch frequencies from 56 to 500 hz , which covers the range found in typical speech signals . also , the pitch analysis produces a pitch correlation value which is the normalized correlation of the signal in the current frame and the signal delayed by the pitch lag values . frames for which the correlation value is below a threshold of 0 . 5 are classified as unvoiced , i . e ., containing no periodic signal , whereas all other frames are classified as voiced . the pitch lags are input to the arithmetic coder 518 and noise shaping quantizer 516 . for voiced frames , a long - term prediction analysis is performed on the lpc residual . the lpc residual r lpc is supplied from the lpc analysis block 504 to the ltp analysis block 510 . for each subframe , the ltp analysis block 510 solves normal equations to find 5 linear prediction filter coefficients b i such that the energy in the ltp residual r ltp for that subframe : thus , the ltp residual is computed as the lpc residual in the current subframe minus a filtered and delayed lpc residual . the lpc residual in the current subframe and the delayed lpc residual are both generated with an lpc analysis filter controlled by the same lpc coefficients . that means that when the lpc coefficients were updated , an lpc residual is computed not only for the current frame but also a new lpc residual is computed for at least lag + 2 samples preceding the current frame . the ltp coefficients for each frame are quantized using a vector quantizer ( vq ). the resulting vq codebook index is input to the arithmetic coder , and the quantized ltp coefficients b q are input to the noise shaping quantizer . the high - pass filtered input is analyzed by the noise shaping analysis block 514 to find filter coefficients and quantization gains used in the noise shaping quantizer . the filter coefficients determine the distribution over the quantization noise over the spectrum , and are chose such that the quantization is least audible . the quantization gains determine the step size of the residual quantizer and as such govern the balance between bitrate and quantization noise level . all noise shaping parameters are computed and applied per subframe of 5 milliseconds . first , a 16 th order noise shaping lpc analysis is performed on a windowed signal block of 16 milliseconds . the signal block has a look - ahead of 5 milliseconds relative to the current subframe , and the window is an asymmetric sine window . the noise shaping lpc analysis is done with the autocorrelation method . the quantization gain is found as the square - root of the residual energy from the noise shaping lpc analysis , multiplied by a constant to set the average bitrate to the desired level . for voiced frames , the quantization gain is further multiplied by 0 . 5 times the inverse of the pitch correlation determined by the pitch analyses , to reduce the level of quantization noise which is more easily audible for voiced signals . the quantization gain for each subframe is quantized , and the quantization indices are input to the arithmetically encoder 518 . the quantized quantization gains are input to the noise shaping quantizer 516 . next a set of short - term noise shaping coefficients a shape , i are found by applying bandwidth expansion to the coefficients found in the noise shaping lpc analysis . this bandwidth expansion moves the roots of the noise shaping lpc polynomial towards the origin , according to the formula : where a autocorr , i is the ith coefficient from the noise shaping lpc analysis and for the bandwidth expansion factor g a value of 0 . 94 was found to give good results . for voiced frames , the noise shaping quantizer also applies long - term noise shaping . it uses three filter taps , described by : the short - term and long - term noise shaping coefficients are input to the noise shaping quantizer 516 . a sparseness measure s is computed from the lpc residual signal . first ten energies of the lpc residual signals in the current frame are determined , one energy per block of 2 milliseconds then the sparseness measure is obtained as the absolute difference between logarithms of energies in consecutive blocks is added for the frame the high - pass filtered input is also input to the noise shaping quantizer 516 . an example of the noise shaping quantizer 516 is now discussed in relation to fig6 . the noise shaping quantizer 516 comprises a first addition stage 602 , a first subtraction stage 604 , a first amplifier 606 , a scalar quantizer 608 , a second amplifier 609 , a second addition stage 610 , a shaping filter 612 , a prediction filter 614 and a second subtraction stage 616 . the shaping filter 612 comprises a third addition stage 618 , a long - term shaping block 620 , a third subtraction stage 622 , and a short - term shaping block 624 . the prediction filter 614 comprises a fourth addition stage 626 , a long - term prediction block 628 , a fourth subtraction stage 630 , and a short - term prediction block 632 . the first addition stage 602 has an input arranged to receive the high - pass filtered input from the high - pass filter 502 , and another input coupled to an output of the third addition stage 618 . the first subtraction stage has inputs coupled to outputs of the first addition stage 602 and fourth addition stage 626 . the first amplifier has a signal input coupled to an output of the first subtraction stage and an output coupled to an input of the scalar quantizer 608 . the first amplifier 606 also has a control input coupled to the output of the noise shaping analysis block 514 . the scalar quantiser 608 has outputs coupled to inputs of the second amplifier 609 and the arithmetic encoding block 518 . the second amplifier 609 also has a control input coupled to the output of the noise shaping analysis block 514 , and an output coupled to the an input of the second addition stage 610 . the other input of the second addition stage 610 is coupled to an output of the fourth addition stage 626 . an output of the second addition stage is coupled back to the input of the first addition stage 602 , and to an input of the short - term prediction block 632 and the fourth subtraction stage 630 . an output of the short - tem prediction block 632 is coupled to the other input of the fourth subtraction stage 630 . the fourth addition stage 626 has inputs coupled to outputs of the long - term prediction block 628 and short - term prediction block 632 . the output of the second addition stage 610 is further coupled to an input of the second subtraction stage 616 , and the other input of the second subtraction stage 616 is coupled to the input from the high - pass filter 502 . an output of the second subtraction stage 616 is coupled to inputs of the short - term shaping block 624 and the third subtraction stage 622 . an output of the short - tem shaping block 624 is coupled to the other input of the third subtraction stage 622 . the third addition stage 618 has inputs coupled to outputs of the long - term shaping block 620 and short - term prediction block 624 . the purpose of the noise shaping quantizer 516 is to quantize the ltp residual signal in a manner that weights the distortion noise created by the quantisation into parts of the frequency spectrum where the human ear is more tolerant to noise . in operation , all gains and filter coefficients and gains are updated for every subframe , except for the lpc coefficients , which are updated once per frame . the noise shaping quantizer 516 generates a quantized output signal that is identical to the output signal ultimately generated in the decoder . the input signal is subtracted from this quantized output signal at the second subtraction stage 616 to obtain the quantization error signal d ( n ). the quantization error signal is input to a shaping filter 612 , described in detail later . the output of the shaping filter 612 is added to the input signal at the first addition stage 602 in order to effect the spectral shaping of the quantization noise . from the resulting signal , the output of the prediction filter 614 , described in detail below , is subtracted at the first subtraction stage 604 to create a residual signal . the residual signal is multiplied at the first amplifier 606 by the inverse quantized quantization gain from the noise shaping analysis block 514 , and input to the scalar quantizer 608 . the quantization indices of the scalar quantizer 608 represent an excitation signal that is input to the arithmetically encoder 518 . the scalar quantizer 608 also outputs a quantization signal , which is multiplied at the second amplifier 609 by the quantized quantization gain from the noise shaping analysis block 514 to create an excitation signal . the output of the prediction filter 614 is added at the second addition stage to the excitation signal to form the quantized output signal . the quantized output signal is input to the prediction filter 614 . on a point of terminology , note that there is a small difference between the terms “ residual ” and “ excitation ”. a residual is obtained by subtracting a prediction from the input speech signal . an excitation is based on only the quantizer output . often , the residual is simply the quantizer input and the excitation is its output . the shaping filter 612 inputs the quantization error signal d ( n ) to a short - term shaping filter 624 , which uses the short - term shaping coefficients a shape , i to create a short - term shaping signal s short ( n ), according to the formula : the short - term shaping signal is subtracted at the third addition stage 622 from the quantization error signal to create a shaping residual signal f ( n ). the shaping residual signal is input to a long - term shaping filter 620 which uses the long - term shaping coefficients b shape , i to create a long - term shaping signal s long ( n ), according to the formula : the short - term and long - term shaping signals are added together at the third addition stage 618 to create the shaping filter output signal . the prediction filter 614 inputs the quantized output signal y ( n ) to a short - term prediction filter 632 , which uses the quantized lpc coefficients a i to create a short - term prediction signal p short ( n ), according to the formula : the short - term prediction signal is subtracted at the fourth subtraction stage 630 from the quantized output signal to create an lpc excitation signal e lpc ( n ). the lpc excitation signal is input to a long - term prediction filter 628 which uses the quantized long - term prediction coefficients b i to create a long - term prediction signal p long ( n ), according to the formula : the short - term and long - term prediction signals are added together at the fourth addition stage 626 to create the prediction filter output signal . the lsf indices , ltp indices , quantization gains indices pitch lags and are each arithmetically encoded and multiplexed by the arithmetic encoder 518 to create the payload bitstream . the arithmetic encoder 518 uses a look - up table with probability values for each index . the look - up tables are created by running a database of speech training signals and measuring frequencies of each of the index values . the frequencies are translated into probabilities through a normalization step . the excitation quantization indices are encoded in the arithmetic encoder 518 using the technique described above with reference to fig3 . an example decoder 700 for use in decoding a signal encoded according to embodiments of the present invention is now described in relation to fig7 . the decoder 700 comprises an arithmetic decoding and dequantizing block 702 , an excitation generation block 704 , an ltp synthesis filter 706 , and an lpc synthesis filter 708 . the arithmetic decoding and dequantizing block 702 has an input arranged to receive an encoded bitstream from an input device such as a wired modem or wireless transceiver , and has outputs coupled to inputs of each of the excitation generation block 704 , ltp synthesis filter 706 and lpc synthesis filter 708 . the excitation generation block 704 has an output coupled to an input of the ltp synthesis filter 706 , and the ltp synthesis block 706 has an output connected to an input of the lpc synthesis filter 708 . the lpc synthesis filter has an output arranged to provide a decoded output for supply to an output device such as a speaker or headphones . at the arithmetic decoding and dequantizing block 702 , the arithmetically encoded bitstream is demultiplexed and decoded to create lsf indices , ltp indices and ltp indices , quantization gains indices and pitch lags . the decoding block 702 decodes a frame of 320 excitation quantization indices , in 20 blocks of 16 quantization indices each . each block is sequentially and independently decoded . for each block , a radius k , representing the sum of absolute values of quantization indices in that block , is arithmetically decoded using a fixed , prestored table of probability values . next , the distribution of absolute values over the block is reconstructed by recursively splitting the entropy coded bitstream representing a parent block into two equal - sized subblocks , starting with the block of 16 absolute values , and decoding the distribution of summed absolute values over the two subblocks . for each split , a probability table p is selected based on the length of the parent block and the sum of absolute values k parent in the parent block . the probability table p stores the probability of having a sum of absolute values k sub , 0 in the first subblock ( block 0 ), for values of k sub , 0 from 0 to k parent . the sum of absolute values in the first subblock is arithmetically decoded using the selected probability table . the sum of absolute values in the second subblock is computed as whenever a subblock is encountered for which the sum of absolute values is zero , the absolute values in that subblock are set to zero without further arithmetic decoding . after decoding the block for each nonzero absolute value in the block , the sign value s ( n ) is arithmetically decoded using a table of probability values and multiplied with the absolute value u ( n ) to produce the quantization index . in pseudo code , this procedure can be expressed as select a probability table p = table { m }{ k m ( i − 1 )}; the quantized quantization gains , one for each subframe of 5 milliseconds , are multiplied by the quantization indices q ( n ) to produce the excitation signals e ( n ). the lsf indices are converted to quantized lsfs by adding the codebook vectors of the ten stages of the msvq . the quantized lsfs are transformed to quantized lpc coefficients . the ltp indices and gains indices are converted to quantized ltp coefficients and quantization gains , through look ups in the quantization codebooks . at the excitation generation block , the excitation quantization indices signal is multiplied by the quantization gain to create an excitation signal e ( n ). the excitation signal is input to the ltp synthesis filter 706 to create the lpc excitation signal e lpc ( n ) according to : using the pitch lag and quantized ltp coefficients b i . the lpc excitation signal is input to the lpc synthesis filter to create the decoded speech signal y ( n ) according to : the encoder 500 and decoder 700 are preferably implemented in software , such that each of the components 502 to 632 and 702 to 708 comprise modules of software stored on one or more memory devices and executed on a processor . a preferred application of the present invention is to encode speech for transmission over a packet - based network such as the internet , preferably using a peer - to - peer ( p2p ) network implemented over the internet , for example as part of a live call such as a voice over ip ( voip ) call . in this case , the encoder 500 and decoder 700 are preferably implemented in client application software executed on end - user terminals of two users communicating over the p2p system . it will be appreciated that the above embodiments are described only by way of example . other applications and configurations may be apparent to the person skilled in the art given the disclosure herein . the scope of the invention is not limited by the described embodiments , but only by the following claims .