in a preferred embodiment , a quantization parameter , qp , determines the quantization step - size , qs . in order to achieve qp invariance as bit depth changes , it is necessary to normalize qs with respect to the most significant bit of the input data sample bit depth . if a given qp maps to a quantization step - size qs 8 for 8 - bit samples , then the resulting quantization step - size for n - bit samples is note that the implementation of these changes simply requires additional shift operations with respect to the operations on 8 - bit data . although equations 7 through 11 may be expressed more generally , they are expressed with respect to an 8 - bit reference because 8 - bit bit depths have been common heretofore . fig6 shows schematically a generic quantization and dequantization system in accordance with aspects of the present invention . the quantization parameter qp is applied to a first mapping function 22 that generates a quantization step - size qs n in accordance with predetermined qp to qs mapping relationships and a bit depth n . the quantization step - size qs n is determined in accordance with equation 7 ( above ). n + k is the bit depth of the ( n + k )- bit data words x applied to quantizer 24 that quantizes the x data words in accordance with step - size qs n to produce quantized data words q having a bit length that is a function of qp , as discussed further below the same qp value is also applied to a second mapping function 26 that generates a quantization step - size qs m in accordance with the same predetermined qp to qs mapping relationships but in response to a bit depth m that may be different from the bit depth n to which mapping 22 is responsive . bit depth m + k is the bit depth of the ( m + k )- bit data words produced by dequantizer 28 . the dequantization step size qs m is determined in accordance with equation 7 ( above ). dequantizer 28 receives the quantized data words q and produces ( m + k )- bit data words x ′ that approximate the x data words . fig7 shows schematically a generic depiction of a video encoder and decoder , such as the h . 264 encoder and decoder shown in fig2 and fig3 , showing how quantization and dequantization aspects of the present invention may be employed in such encoders and decoders . for the encoder of fig7 ( a ), the block labeled “ process ( transformation )” transforms the input samples into the variables to be quantized . this block corresponds generally to the portion of fig2 enclosed by the dashed lines . the block labeled “ process ( entropy coding )” assembles an encoded bitstream after entropy coding the quantized variables . similarly , for the decoder in fig7 ( b ), the block labeled “ process ( entropy decoding )” parses encoded bitstream and entropy decodes the entropy - coded quantized variables . the block labeled “ process ( reconstruction )” reconstructs the output samples from the decoded and dequantized variables and corresponds generally to the portion of fig3 enclosed by the dashed line . the encoder shown in fig7 ( a ) receives input symbols s of n bits and transforms them into a sequence of variables x having n + k bits where k is a function of the “ process ( transformation )” block and is typically greater than zero . the encoder is also provided with a qp value and the bit depth n of the input symbols s . each variable x is quantized by a quantizing step - size qs n appropriate for a sample bit depth of n . qs n is determined by a mapping from qp to qs 8 followed by the normalization given by equation 7 . the resulting quantized variables are entropy coded and combined with n , qp and other parameters to produce an encoded bitstream . in practice , qp needs to be sent in the bitstream only when it changes . sending n is useful for indicating that drift reduction is required if m & lt ; n or that emulation of lower precision arithmetic in the decoder is required if m & gt ; n . n is required to indicate the number of additional values of qp may be required . the encoded bitstream is decoded by the decoder shown in fig7 ( b ) to yield the original n , qp , additional parameters and the quantized variables q . in the decoder , these quantized variables are dequantized with a quantization step - size qs m appropriate for m bit samples of the desired output . qs m is derived analogously to qs n using a mapping from qp to qs 8 followed by the normalization to m bits given by equation 7 . the final output s ′ is thus an m - bit approximation to the n - bit samples s in the original image . fully utilizing the capabilities of greater bit depths requires smaller values for the quantization step - size , qs . to achieve the improved quality ( the higher psnr shown in table 1 ) possible with greater bit depths while maintaining qp invariance requires not only the retention of existing values for qs but also requires additional values for qp to indicate the newly added finer values for qs . retaining the existing values of qs may also require newly added intermediate values of qp , as is explained further below . the prior art , by normalizing the quantization with respect to the least significant bit , adds finer quantization step - sizes at the expense of losing coarser values of qs as shown in table 3 . the example of table 3 pertains to identity mapping in which qp = qs . while the quantization step - sizes are the same with respect to the lsb for 8 - bit and 10 - bit bit depths ( qs 8 and qs 10 are the same value as qp for both bit depths in the case of lsb normalization ), they are not with respect to the msb ( for example , 2 − 8 for qs 8 and 2 − 10 for qs 10 for qp = 1 in the case of msb normalization ). thus the quantization step - sizes for 10 bits have additional fine values for qp = 1 , 2 , 3 , but sacrifice all the quantization step - sizes larger than 2 − 5 with respect to the msb . for this invention , the manner in which these new quantization step sizes are added depends on the mapping from qp to qs introduced previously in equations ( 5 ) and ( 6 ). used in mpeg - 2 and elsewhere this means that qp should now indicate additional values for qs in order to exploit more fully the benefits of greater bit depths . for example , suppose that for 8 - bit bit - depth , input samples the values for qp are the integers { 1 , 2 , 3 , 4 . . . k } and therefore the values for qs are simply the same integers { 1 , 2 , 3 , 4 . . . k }. the quantization step - sizes for 10 bits that achieve qp invariance ( for the original values of qp ) are then the intermediate qs values { 4 , 8 , 12 , 16 . . . 4 × k }. this skips over the integers up to and between those values , i . e ., { 1 , 2 , 3 , 5 , 6 , 7 , 9 , 10 , 11 . . . 4 × k − 2 , 4 × k − 1 }. thus , to have all the possible integer quantization step - sizes at 10 - bits ( i . e ., all of the original step sizes and all of the new finer step sizes ), qp requires two extra “ fractional ” bits to indicate the values { ¼ , ½ , ¾ , 1 , 1¼ , 1½ , 1¾ , 2 , . . . , k − ¼ , k }. an example of such a relationship between qp and qs at bit depths of 8 and 10 that achieves qp invariance is shown in table 4 . the case of identity mapping requires determining the number of fractional and integer bits in qp . one way to achieve this is to send the input bit depth , n , in the compressed bitstream . the number of fractional bits in qp ( and hence qs ) is simply n − 8 . the following two examples illustrate the quantization method according to aspects of the present invention for the case of identity mapping . table 5 compares the coding of 10 - bit data and the same data rounded to 8 - bits at qp = 1 to show that the results agree as one would expect . in practice , one would not have to make a separate encoding at 8 bits , instead , one could encode at 10 bits and then decode at 8 or 10 bits . for a given value of qp , the quantization step - size , qs , changes with bit depth according to equation ( 7 ). x is the data to be quantized , which , in this example , has two more bits than the input data , i . e ., k = 2 . thus , what is referred to herein as the “ 8 - bit x ” has 10 (= n + k ) bits . the 8 - bit x is the 10 - bit x rounded to 8 bits . note that the quantized values q are exactly the same because they are a function of qp ( in this example , a qp of 1 results in a quantized bit length of 10 bits regardless of the bit depth ). it is the equality , within rounding error , of the quantized values q that unifies operation for a given value of qp at different bit depths , allowing the bitstreams for different bit depths to be compatible for a given value of qp . note that the dequantized values x ′ are the same to within the rounding error ( interpreting the 2 least significant bits of the 10 - bit version as fractional bits when comparing to the 8 - bit version ). thus , substantially the same quality results at different bit depths when qp has the same value at the different bit depths . table 5 example shows that the quantized values , q , always have the same scale regardless of bit depth for a given qp . this makes 8 - bit and 10 - bit compressed bitstreams nearly identical in content , differing only to the extent of any rounding error . the respective bitstreams resulting from the same qp value thus may be identical in syntax and semantics even though they represent different encoded bit depths . the second example , in table 6 , compares 8 - and 10 - bit decoding at a qp of ¼ , assuming an enhanced 8 - bit decoder that can accept fractional qps . in this case x ′ differs by rounding error as one would expect . overall , the differences in dequantized values x ′ are within rounding error ( table 1 ). as in the table 5 example , the number of bits required for the quantized values , q , is a function of qp , but not bit depth . such results are due to the scaling for qs given in equation 7 and are true independent of the mapping from qp to qs . in the table 6 example , qp has a lower value , resulting in the potential of a higher quality decoded x ′ ( q is 10 bits rather than 8 bits as in the table 5 example , allowing a 10 - bit decoding ( or , if desired , an 8 - bit decoding with a loss of resolution ). for the case of 8 - bit decoding , it is assumed that the encoder receives an input x having a bit depth of 10 bits ( or more ) in order to obtain a 10 - bit quantized value q in which the last two least significant bits are not zero . making it necessary only to extend the range of qp in the negative direction . the values for qp remain integers although they are now signed . because of the qp / 6 in the exponent , every additional bit of sample bit depth allows the minimum value for qp to decrease by 6 . thus if the qp range for 8 bits is , say , [ 0 , 51 ] then the qp range for 10 bits would be [− 12 , 51 ]. in addition to qp remaining an integer , this mapping allocates qp values more efficiently than the identity mapping as was described earlier and shown in table 2 and fig5 . higher bit depths enable higher quality , which occurs at lower values of qp . the exponential mapping adds all these additional qp values in this range . fig8 shows schematically how higher bit depths add more negative values for qp . we can now see why the exponential mapping provides a more efficient framework in which to add these new qp values . in going from 8 to 10 bits , the identity mapping requires two extra bits to represent qp but only adds three values , { ¼ , ½ , ¾ }, of smaller quantization step - sizes , with the other additional values filling in between existing qp values , most of which are at high qp ( low quality ) values . in contrast , with the exponential mapping each additional bit of sample depth adds six smaller qp ( and qs ) values . thus , going from 8 to 10 bits adds 12 finer qs values for the exponential mapping while the identity mapping adds only 3 . furthermore , it requires fewer bits to signal these additional qp values . using just one extra bit ( the sign bit ) in the representation of qp is sufficient to handle a bit depth of 16 bits . these changes enable the possibility of compatible compressed bitstreams . once the effects of bit depth are properly accounted for , the compressed representation is essentially independent of bit depth . that is , all control elements of the stream ( such as qp ) are exactly the same . numerical elements ( such as quantized values , like q ) are the same to within round - off error . informational elements ( such as the bit depth , n ) can differ . consequently , decoders of differing bit depths simply use more or less precision in their calculations . examples of decoding at bit depths greater than encoded bit depths are give in united states patent publication us 2002 / 0154693 a1 , of gary a . demos et al , published oct . 24 , 2002 . said demos et al application is hereby incorporated by reference in its entirety . the rate - distortion curve in fig9 illustrates a fundamental principle — that qp determines the overall system performance within the constraints of the encoding and decoding bit depths . that is , qp , which represents the quantization of the compressed data is the dominant controller of quality , while the bit depth , which represents the quantization of the input and output samples , only determines whether or not the best performance possible for a given qp is achieved . the operating point indicated by “ x ” is at one qp and the two indicated by “ y ” are at a different and smaller qp . the qp indicated by x yields essentially the same performance regardless of bit depth . conversely , the performance at the qp indicated by y is a case where the qp is so low that 10 bits are required to achieve the best possible psnr . thus , it becomes possible , for example , to encode data at its original or native ( i . e ., highest ) bit depth , and then decode at any desired bit depth . in this way , the original bit depth limits the quality of the decompressed result , the decompressed bit depth , and the compressed bit rate in an optimal way . fig9 shows the resulting behavior . in this case , the original source material has a bit depth of 10 bits . this is encoded according to aspects of the present invention . this bitstream can then be decoded at both the original 10 bits , as well as an approximate version at 8 bits . note that at low bit rates the r - d curves for both cases are nearly identical . then , as the rate - distortion curves approach the round - off threshold for 8 bits (˜ 59 db as shown in table 1 ), the 8 - bit curve begins to fall away leaving only the 10 - bit curve to achieve the higher psnrs . the more limited range of qp values at 8 bits causes its curve to terminate at lower psnr and bit rate . as mentioned above , as 8 - bit decoding of some quantized value differs only from the corresponding 10 - bit decoding by round - off error . this round - off error can accumulate from prediction to prediction , i . e . p - frames . this error results in a mse between the 8 - bit and 10 - bit decodings , which is known as drift . this drift typically is neither noticeable nor objectionable in normal practice ( i . e . i - frame spacing ). in the case where the decoded bit depth , m , is greater than the input ( encoding ) bit depth , n , the resulting drift can be eliminated by sending n in the bitstream , and then emulating the coarser arithmetic of an n - bit decoder . the invention may be implemented in hardware or software , or a combination of both ( e . g ., programmable logic arrays ). unless otherwise specified , the algorithms included as part of the invention are not inherently related to any particular computer or other apparatus . in particular , various general - purpose machines may be used with programs written in accordance with the teachings herein , or it may be more convenient to construct more specialized apparatus ( e . g ., integrated circuits ) to perform the required method steps . thus , the invention may be implemented in one or more computer programs executing on one or more programmable computer systems each comprising at least one processor , at least one data storage system ( including volatile and non - volatile memory and / or storage elements ), at least one input device or port , and at least one output device or port . program code is applied to input data to perform the functions described herein and generate output information . the output information is applied to one or more output devices , in known fashion . each such program may be implemented in any desired computer language ( including machine , assembly , or high level procedural , logical , or object oriented programming languages ) to communicate with a computer system . in any case , the language may be a compiled or interpreted language . each such computer program is preferably stored on or downloaded to a storage media or device ( e . g ., solid state memory or media , or magnetic or optical media ) readable by a general or special purpose programmable computer , for configuring and operating the computer when the storage media or device is read by the computer system to perform the procedures described herein . the inventive system may also be considered to be implemented as a computer - readable storage medium , configured with a computer program , where the storage medium so configured causes a computer system to operate in a specific and predefined manner to perform the functions described herein . a number of embodiments of the invention have been described . nevertheless , it will be understood that various modifications may be made without departing from the spirit and scope of the invention . for example , some of the steps described above may be order independent , and thus can be performed in an order different from that described . accordingly , other embodiments are within the scope of the following claims .