DeinterlaceMotionAdaptive

Performs deinterlacing using temporal and spatial interpolations.

Syntax

IppStatus ippiDeinterlaceMotionAdaptive_8u_C1(const Ipp8u* pSrcPlane[4], int srcStep, Ipp8u* pDst, int dstStep, IppiSize planeSize, int threshold, int topFirst, int topField, int copyField, int artifactProtection);

Parameters

pSrcPlane

Array of pointers to source images: four consecutive source plane pointers.

srcStep

Distance in bytes between starts of the consecutive lines in the source image buffer.

pDst

Pointer to the destination image.

dstStep

Distance in bytes between starts of the consecutive lines in the destination image buffer.

planeSize

Size of the image plane in pixels.

threshold

Threshold level value [0-256]. The default value is 12. A tradeoff between flickering and residual combing artifacts. You may decrease the value of the threshold to reduce combing artifacts in moving objects, but note that flickering in the static region may increase. Zero value corresponds to the bob-deinterlacing.

topFirst

Defines the field order for the video sequence; can be 0 - bottom field is the first field, 1 - top field is the first field.

topField

Defines the field to process; can be 0 - bottom field, 1 - top field.

copyField

Defines copying of unprocessed field from the source frame to the destination; can be 0 - the unprocessed field is not copied to the destination frame, 1 - the unprocessed field is copied from the source frame to the destination.

artifactProtection

Sets the additional artifact protection to suppress distortion; can be 0 - disabling artifact protection, 1 - enabling artifact protection.

Description

The function ippiDeinterlaceMotionAdaptive_8u_C1 is declared in the ippvc.h file. The function performs deinterlacing of a two-field image using two consecutive steps - temporal and spatial interpolations. The first step is used to detect significant temporal difference between pixels from different consecutive frames. The second step is used to detect minor spatial changes between vertical neighbor pixels from opposite fields.

The input sequence of source planes must be set according to the value of the parameters topFirst and topField. If the processed field is the second field in the frame, the input source planes must be from the previous, current, next, and next after next frames. Otherwise, if the first field is processed, the input source planes must be from the pre-previous, previous, current, and next source frames.

The function can be used to process the source image by parts (slices). To keep the equivalence of slice processing to the processing of the whole image, the following method should be used depending on the parameter topField:

For the top field, the upper part of the image, which begins from the zero line and contains an even number of lines processed by the function in an ordinary way, topField is set to 1. Other slices of the source image must contain all necessary neighbor lines to perform deinterlacing. Because of this requirement, other slices of the image that begin from an even line and contain an even number of lines should be extended with one upper neighbor odd line, and topField should be set to 0. For the bottom field, the lower part of the image, which ends with the last odd line and contains an even number of lines processed by the function in an ordinary way, topField is set to 0. Other slices of the source image that end with the odd line and contain an even number of lines should be extended with one lower neighbor even line, and topField should be set to 0.

The unprocessed field should be copied to the destination frame separately, if necessary.

Return Values

ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error condition if planeSize has a field with zero or negative value.

ippStsMemAllocErr

Indicates a memory allocation error.


Submit feedback on this help topic

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