cc [ flag... ] file... –lmlib [ library... ] #include <mlib.h> mlib_status mlib_VideoDCT8x8Quantize_S16_S16_B12( mlib_s16 coeffs, const mlib_s16 block, const mlib_d64 dqtable);
The mlib_VideoDCT8x8Quantize_S16_S16_B12() function computes the forward DCT and then quantizes the DCT coefficients. It's a combination of mlib_VideoDCT8x8_S16_S16_B12() and mlib_VideoQuantize_S16() for better performance. The source to the DCT routine can occupy up to 12 bits for each of its elements, i.e., should be within the range of [-2048, 2047].
The source and destination buffer addresses must be 8-byte aligned.
This function can be used in JPEG with 12-bit precision, or in MPEG for the inter mode.
The function takes the following arguments:
Pointer to the quantized DCT coefficients. Note that coeffs must be 8-byte aligned.
Pointer to an 8x8 block. Note that block must be 8-byte aligned.
Pointer to the quantization table generated by mlib_VideoQuantizeInit_S16().
The function returns MLIB_SUCCESS if successful. Otherwise it returns MLIB_FAILURE.
See attributes(5) for descriptions of the following attributes: