DeinterlaceBlendInit

Initializes an internal structure for DeinterlaceBlend function.

Syntax

IppStatus ippiDeinterlaceBlendInit_8u_C1(IppiSize size, int blendThresh[2], double blendConstants[2], IppiDeinterlaceBlendState_8u_C1** ppState, Ippi8u* pMemState);

IppStatus ippiDeinterlaceBlendInit_8u_C2(IppiSize size, int blendThresh[2], double blendConstants[2], IppiDeinterlaceBlendState_8u_C2** ppSpec, Ippi8u* pMemState);

Parameters

size

Size of the image plane in pixels.

blendThresh

Array of two thresholds to determine alpha-coefficients; parameter values must be in the range [0,255]. Recommended values are 5, 9.

blendConstants

Array of two values tfor alpha-coefficients; parameter values must be in the range [0.0, 0.1]. Recommended values are 0.3, 0.7. The blendConstants parameter corresponds to blendThresh.

ppState

Pointer to pointer to an instance of the IppiDeinterlaceBlendState_8u_C1 structure initialized in accordance with the values of blendConstants[2] and blendThresh[2]. The function DeinterlaceBlendInit__8u_C1 allocates the structure in the pMemStateIppiDeinterlaceBlendState_8u_C1 buffer.

ppSpec

Pointer to pointer to an instance of the IppiDeinterlaceBlendState_8u_C2 structure initialized in accordance with the values of blendConstants[2] and blendThresh[2]. The function DeinterlaceBlendInit__8u_C2 allocates the structure in the pMemState buffer.

pMemState

Pointer to an array that you allocated for IppiDeinterlaceBlendState_8u_C1 or IppiDeinterlaceBlendState_8u_C2 structure. The size of the array does not depend on the image plane size. Call the DeinterlaceBlendGetSize_8u_C1 or DeinterlaceBlendGetSize_8u_C2 function respectively to calculate it.

Description

The functions ippiDeinterlaceBlendInit_8u_C1 and ippiDeinterlaceBlendInit_8u_C2 are declared in the ippvc.h file. The functions initialize a structure pointed to by ppState or ppSpec respectively in accordance with the values of blendConstants[2] and blendThresh[2]. You should allocate memory for the structure in the external buffer pMemState. If you use these functions, do not call DeinterlaceBlendFree_8u_C1 or DeinterlaceBlendFree_8u_C2 to free the pMemState buffer.

Return Values

ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition when the specified pointer is NULL.

ippStsSizeErr

Indicates an error condition if size has a field with a value smaller than 3.

ippiDeinterlaceBlendInit_8u_C1 Usage Example

Int     stateSize;
Ipp8u*  pMemState;
IppiDeinterlaceBlendState_8u_C1* pState=NULL; 
IppiSize planeSize={1664,1088]; /* size of the image plane in pixels, no dependency
                                   on stateSize */     
 
Sts = ippiDeinterlaceBlendGetSize_8u_C1 (&stateSize);
pMemState = malloc(stateSize);
 
sts = ippiDeinterlaceBlendInit_8u_C1 (planeSize, blendThresh[2], blendConstants[2],
                                      &pState, pMemState);
{
...pState processing...
...
}
free(pMemState);
pState = NULL;

ippiDeinterlaceBlendInit_8u_C2 Usage Example

Int     stateSize;
Ipp8u*  pMemState;
IppiDeinterlaceBlendState_8u_C2* pSpec=NULL;
IppiSize planeSize={1664,1088]; /* size of the image plane in pixels, no dependency
                                   on stateSize */      
 
Sts = ippiDeinterlaceBlendGetSize_8u_C2 (&specSize);
pMemState = malloc(specSize);
 
sts = ippiDeinterlaceBlendInit_8u_C2 (planeSize, blendThresh[2], blendConstants[2],
                                      &pSpec, pMemState);
{
...pSpec processing...
...
}
free(pMemState);
pSpec = NULL;

Submit feedback on this help topic

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