Table of Contents

NAME

QccIMGImageComponentDeinterlace, QccIMGImageDeinterlace, QccIMGImageSequenceDeinterlace - image, image-component, and image-sequence deinterlacing

SYNOPSIS

#include "libQccPack.h"

int QccIMGImageComponentDeinterlace(const QccIMGImageComponent *input_component, QccIMGImageComponent *output_component1, QccIMGImageComponent *output_component2);

int QccIMGImageDeinterlace(const QccIMGImage *input_image, QccIMGImage *output_image1, QccIMGImage *output_image2);

int QccIMGImageSequenceDeinterlace(QccIMGImageSequence *input_sequence, QccIMGImageSequence *output_sequence, int supersample);

DESCRIPTION

QccIMGImageComponentDeinterlace() is a simple image deinterlacer that converts an interlaced image component, input_component, into two non-interlaced (progressive) image components, output_component1 and output_component2. In effect, QccIMGImageComponentDeinterlace() implements simple line doubling with interpolation, in which the top field (even lines) of input_component are copied directly into the even lines of output_component1 while the odd lines of output_component1 are created by averaging the nearest two even lines. Likewise, the bottom field (odd lines) of input_component are copied directly into the odd lines of output_component2 while the even lines of output_component2 are created by averaging the nearest two odd lines.

input_component, output_component1, and output_component2 must all be the same size, and output_component1, and output_component2 must be allocated prior to calling QccIMGImageComponentDeinterlace().

QccIMGImageDeinterlace() deinterlaces input_image, producing two non-interlaced (progressive) images, output_image1 and output_image2. In effect, QccIMGImageDeinterlace() simply calls QccIMGImageComponentDeinterlace() for each of the Y, U, and V components of the images.

QccIMGImageSequenceDeinterlace() converts interlaced-scanned images of sequence input_sequence to progressive-scanned images which are output to output_sequence. QccIMGImageSequenceDeinterlace() operates in one of two modes depending on the value of supersample.

If supersample is 0, QccIMGImageSequenceDeinterlace() deinterlaces each frame of the sequence via a call to QccIMGImageDeinterlace(), and outputs the first frame of the deinterlaced output frame pair to output_sequence. Note that, in this mode of operation, the second deinterlaced frame output by QccIMGImageDeinterlace() is discarded, so that output_sequence has exactly the same number of frames as input_sequence.

The second mode of operation for QccIMGImageSequenceDeinterlace() is specified when supersample is non-zero. In this mode of operation, both deinterlaced frames output by QccIMGImageDeinterlace() are retained and output to output_sequence. In this mode of operation, output_sequence has twice as many frames as input_sequence; i.e., the temporal sampling rate is doubled.

The first frame of output_sequence has the same number as the first frame of input_sequence. The starting and ending frame numbers of input_sequence must be known, and input_sequence->current_frame must be allocated, prior to calling QccIMGImageSequenceDeinterlace(). That is, QccIMGImageSequenceFindFrameNums(3) and QccIMGImageSequenceStartRead(3) should be called on input_sequence prior to calling QccIMGImageSequenceDeinterlace(). Additionally, output_sequence must be allocated to the same image size as input_sequence via a call to QccIMGImageSequenceAlloc(3) prior to calling QccIMGImageSequenceDeinterlace().

RETURN VALUE

These routines return 0 on success, 1 on failure.

SEE ALSO

QccIMGImageComponent(3) , QccIMGImage(3) , QccIMGImageSequence(3) , QccPackIMG(3) , QccPack(3)

AUTHOR

Copyright (C) 1997-2021 James E. Fowler


Table of Contents



Get QccPack at SourceForge.net. Fast, secure and Free Open Source software downloads