QuantIntraUniform_VC1, QuantIntraNonuniform_VC1

Perform uniform/nonuniform quantization of 8X8 intra blocks.

Syntax

IppStatus ippiQuantIntraUniform_VC1_16s_C1IR( Ipp16s* pSrcDst, Ipp32s srcDstStep, Ipp32s doubleQuant );

IppStatus ippiQuantIntraNonuniform_VC1_16s_C1IR( Ipp16s* pSrcDst, Ipp32s srcDstStep, Ipp32s doubleQuant );

Parameters

pSrcDst

Pointer to the source and destination block.

srcDstStep

Distance in bytes between starts of the consecutive lines in the source and destination blocks.

doubleQuant

Quant coefficient within the range [2, 62].

Description

The functions ippiQuantIntraUniform_VC1_16s_C1IR and ippiQuantIntraNonuniform_VC1_16s_C1IR are declared in the ippvc.h file. The functions perform quantization of all coefficients in intra block (except DC) according to 8.1.2.8 of [ SMPTE 421M ].

In the case of uniform quantization:

a[i]=a[i]/quant_coef;

In the case of nonuniform quantization:

a[i]=(a[i]-sign(a[i])*(quant_coef >> 1))/quant_coef;

where a[i] is the AC coefficient of the intra block, and quant_coef is the quant coefficient.

The doubleQuant parameter should be equal to 2*MQUANT+HALFQP, where MQUANT and HALFQP are defined in the VC-1 standard. MQUANT should be within the range [1;31], HALFQP should be within the range [0,1] if MQUANT ≤ 8 and should be equal to 0, if MQUANT > 8.

ippiQuantIntraUniform_VC1_16s_C1IR Usage

{
Ipp16s*  pSrcDstData = pointer_on_source_and_destination_block;
Ipp32s doubleQuant = quant_coefficient; /* It should be an even number in the
range [2,62];*/
Ipp32s srcDstStep = source_and_destination_step; /* Step of the pointer
pSrcDstData (source and destination array) in bytes */
IppStatus result;

/*
ippStsNoErr         Indicates no error
ippStsNullPtrErr    Indicates an error when pSrcDstData is NULL
ippStsOutOfRangeErr Indicates an error when quantizer doubleQuant is less than 2
or higher than 62
*/

result = ippiQuantIntraUniform_VC1_16s_C1IR ( pSrcDstData, srcDstStep,
doubleQuant );

/*  Performs uniform quantization process for all coefficients in the intra
block (except DC) according to 8.1.2.8 "Inverse AC Coefficient Quantization"
specification of SMPTE 421M
*/
}

ippiQuantIntraNonuniform_VC1_16s_C1IR Usage

{
Ipp16s*  pSrcDstData = pointer_on_source_and_destination_block;
Ipp32s doubleQuant = quant_coefficient; /* It should be an even number in the
range [2,62];*/
Ipp32s srcDstStep = source_and_destination_step; /* Step of the pointer
pSrcDstData (source and destination array) in bytes */
IppStatus result;

/*
ippStsNoErr         Indicates no error
ippStsNullPtrErr    Indicates an error when pSrcDstData is NULL
ippStsOutOfRangeErr Indicates an error when quantizer doubleQuant is less than 2
or higher than 62
*/

result = ippiQuantIntraNonuniform_VC1_16s_C1IR( pSrcDstData, srcDstStep,
doubleQuant );

/* Performs nonuniform quantization process for all coefficients in the intra
block (except DC) according to 8.1.2.8 "Inverse AC Coefficient Quantization"
specification of SMPTE 421M
*/
}

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error condition when pSrcDst is NULL.

ippStsDivByZeroErr

Indicates an error condition when the doubleQuant quantizer is equal to zero.


Submit feedback on this help topic

Copyright © 2000 - 2010, Intel Corporation. All rights reserved.