QuantFwd8X8_JPEG

Quantize data block

Synopsis

FwStatus   fwiQuantFwd8x8_JPEG_16s_C1I ( Fw16s * pSrcDstconst Fw16u * pQuantFwdTable );

Parameters

pQuantFwdTable   Pointer to the forward quantization table (encoder).
pSrcDst   Pointer to a location in a buffer that contains both the source and destination.

Description

This function reads the FDCT output coefficients of an 8X8 data block, quantizes the values, and writes the quantized values back to the same location.

Quantization is performed using the following formula.

 sq[vu] = round (s[vu]/Q[vu])

Nearest integer rounding is used.

The pQuantFwdTable pointer is generated by the fwiQuantFwdTableInit_JPEG_8u16u function, so the final result for sq[vu] is shifted 15 bits.