QuantInvInterUniform_VC1, QuantInvInterNonuniform_VC1

Perform uniform/nonuniform dequantization of inter blocks.

Syntax

IppStatus ippiQuantInvInterUniform_VC1_16s_C1IR(Ipp16s* pSrcDst, Ipp32s srcDstStep, Ipp32s doubleQuant, IppiSize roiSize, IppSize* pDstSizeNZ );

IppStatus ippiQuantInvInterNonuniform_VC1_16s_C1IR(Ipp16s* pSrcDst, Ipp32s srcDstStep, Ipp32s doubleQuant, IppiSize roiSize, IppSize* pDstSizeNZ );

IppStatus ippiQuantInvInterUniform_VC1_16s_C1R(const Ipp16s* pSrc, Ipp32s srcStep, Ipp16s* pDst, Ipp32s dstStep, Ipp32s doubleQuant, IppiSize roiSize, IppiSize* pDstSizeNZ);

IppStatus ippiQuantInvInterNonuniform_VC1_16s_C1R(const Ipp16s* pSrc, Ipp32s srcStep, Ipp16s* pDst, Ipp32s dstStep, Ipp32s doubleQuant, IppiSize roiSize, IppiSize* pDstSizeNZ);

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

Dequant coefficient; should be within the range [2, 62].

roiSize

Inter block size; should be 8x8, 8x4, 4x8 or 4x4.

pDstSizeNZ

Pointer to a size of the top left subblock with non-zero coefficients. This value is calculated by this function and could be used for inverse transformation. See Figure "Inter 8x4 Block Dequantization".

pSrc

Pointer to the source block.

srcStep

Distance in bytes between starts of the consecutive lines in the source block.

pDst

Pointer to the destination block.

dstStep

Distance in bytes between starts of the consecutive lines in the destination block.

Description

The functions ippiQuantInvInterUniform_VC1_16s_C1IR and ippiQuantInvInterNonuniform_VC1_16s_C1IR are declared in the ippvc.h file.

The doubleQuant parameter should be equal to 2*MQUANT+HALFQP, where MQUANT and HALFQP are defined in VC-1 standard.

The functions perform dequantization of inter blocks according to 8.1.2.8 of [SMPTE421M].

In the case of uniform dequantization:

a[i]=quant_coef*a[i];

In the case of nonuniform dequantization:

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

where a[i] is the intra block coefficient, and quant_coef is the dequant coefficient.

Inter 8x4 Block Dequantization



In this case, pDstSizeNZ -> width is equal to 4, and pDstSizeNZ -> height is equal to 3.

See Example “QuantInvInterUniform_VC1 Usage” and Example “QuantInvInterNonuniform_VC1 Usage” for usage of in-place functions

QuantInvInterUniform_VC1 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 */
IppSize roiSize = inter_block_size;
/* It should be:
8x8 (roiSize.width=8, roiSize.height=8)
4x8 (roiSize.width=4, roiSize.height=8)
8x4 (roiSize.width=8, roiSize.height=4)
4x4 (roiSize.width=4, roiSize.height=4)
*/
IppiSize  dstSizeNZ[2];
/*
The size of top left subblock with non-zero coefficients. This value is
calculated by this function and could be used for inverse transformation.
Example (inter 8x4 block):
16 0 0 -3 0 0 0 0
1  1 0  1 0 0 0 0
3  0 0  1 0 0 0 0
0  0 0  0 0 0 0 0
In this case dstSizeNZ.width is equal to 4, dstSizeNZ.height is equal to 3
*/

IppStatus result;
/*
ippStsNoErr         Indicates no error
ippStsNullPtrErr    Indicates an error when pSrcDstData is NULL
ippStsSizeErr       Indicates an error when roiSize.height is not equal 4 or 8
or roiSize.width is not equal 4 or 8
*/
/* in case of 8x4*/
result = ippiQuantInvInterUniform_VC1_16s_C1IR( pSrcDstData, srcDstStep,
doubleQuant, &dstSizeNZ[0] );
result = ippiQuantInvInterUniform_VC1_16s_C1IR( pSrcDstData+ (srcDstStep*2),
srcDstStep, doubleQuant, &dstSizeNZ[1] );


/*  Performs uniform dequantization process for inter block according to 8.1.2.8
"Inverse AC Coefficient Quantization" specification SMPTE 421M
*/
}

QuantInvInterNonuniform_VC1 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 */
IppSize roiSize = inter_block_size;
/* It should be:
8x8 (roiSize.width=8, roiSize.height=8)
4x8 (roiSize.width=4, roiSize.height=8)
8x4 (roiSize.width=8, roiSize.height=4)
4x4 (roiSize.width=4, roiSize.height=4)
*/
IppiSize  dstSizeNZ[4];
/*
The size of top left subblock with non-zero coefficients. This value is
calculated by this function and could be used for inverse transformation.
Example (inter 4x4 block):
16 0 0 -3
1  1 0  1
3  0 0  1
0  0 0  0
In this case dstSizeNZ.width is equal to 4, dstSizeNZ.height is equal to 3
*/
IppStatus result;
/*
ippStsNoErr         Indicates no error
ippStsNullPtrErr    Indicates an error when pSrcDstData is NULL
ippStsSizeErr       Indicates an error when roiSize.height is not equal to 4 or 8
or roiSize.width is not equal to 4 or 8
*/

/* in case of 4x4*/
result = ippiQuantInvInterNonuniform_VC1_16s_C1IR( pSrcDstData, srcDstStep,
doubleQuant, &dstSizeNZ[0] );
result = ippiQuantInvInterNonuniform_VC1_16s_C1IR( pSrcDstData+4, srcDstStep,
doubleQuant, &dstSizeNZ[1] );
result = ippiQuantInvInterNonuniform_VC1_16s_C1IR( pSrcDstData+( srcDstStep*2),
srcDstStep, doubleQuant, &dstSizeNZ[2] );
result = ippiQuantInvInterNonuniform_VC1_16s_C1IR( pSrcDstData+(srcDstStep*2)+4,
srcDstStep, doubleQuant, &dstSizeNZ[3] );


/*  Performs nonuniform dequantization process for inter block according to
8.1.2.8 "Inverse AC Coefficient Quantization" specification SMPTE 421M
*/
}

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error condition when pSrcDst or pDstSizeNZ is NULL.


Submit feedback on this help topic

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