Patent ID: 7986849

Claim:
A method for image compression, the method comprising: receiving a digital image; initializing a plurality of quantization tables; performing quantization of the digital image using two multiplication operations using values from the one or more quantization tables; computing a compensation value for each data value in a sub-image block of the digital image based at least in part on a corresponding scaled reciprocal number, wherein the operation of computing the compensation value using one of the multiplication operations is at least in part preformed by the following computations: Cr[i]=(Dr[i]*X′[i]+(1<<(NBITS−1)))>>NBITS, wherein Cr[i] is the compensation values, Dr[i] is the scaled reciprocal number, X′[i] is the absolute value of each DCT coefficient, and NBITS is a nbits-width quantization table; generating a quantization value for each data value based at least in part on the corresponding compensation value, wherein the operation of generating the quantization value using one of the multiplication operations is at least in part preformed by the following computations: Y[i]=(SignX[i]^(Qr[i]*X′[i]+(1>>(n−1))+Cr[i]>>n)−SignX[i], wherein Y[i] is the quantization value and Qr[i] is the plurality of quantization tables; and providing a compressed version of the digital image.