ColorReductionAdaptor Class Reference

Implementation of Adaptor that removes U and V component in a MPEG4 VES. <short description="">. More...

#include <ColorReductionAdaptor.hpp>

Inheritance diagram for ColorReductionAdaptor:

VideoAdaptorChain AdaptorChain Adaptor List of all members.

Public Member Functions

 ColorReductionAdaptor (VideoESInfo *pESInfo, u32 keyFrameInterval=30, u32 bitrate=0, MP4Decoder::meCoderType coderType=MP4Decoder::FFMPEG)
 Constructor.
virtual ~ColorReductionAdaptor ()
 Destructor.
Adaptorclone ()
 Create a shallow copy of the Adaptor.
void initialize ()
 Initialize internal data structures.

Protected Attributes

u32 keyFrameInterval
u32 targetBitrate
MP4Decoder::meCoderType codec

Detailed Description

Implementation of Adaptor that removes U and V component in a MPEG4 VES. <short description="">.

Author:
Michael Kropfberger and Peter Schojer
Version:
Id
ColorReductionAdaptor.hpp,v 1.5 2004/05/27 17:56:53 pschojer Exp

Definition at line 65 of file ColorReductionAdaptor.hpp.


Constructor & Destructor Documentation

ColorReductionAdaptor::ColorReductionAdaptor VideoESInfo *  pESInfo,
u32  keyFrameInterval = 30,
u32  bitrate = 0,
MP4Decoder::meCoderType  coderType = MP4Decoder::FFMPEG
 

Constructor.

Average Bitrate of ESInfo object will be reduced by 20%, which is approximately the proportion of color in the VES.

Parameters:
pESInfo Pointer to ESInfo object.
Definition at line 46 of file ColorReductionAdaptor.cpp.

References MP4Decoder::meCoderType.

Referenced by clone().

00048 { 00049 es = pESInfo; 00050 initialized = false; 00051 keyFrameInterval = key; 00052 targetBitrate=bitrate; 00053 strcpy(name,"ColorReductionAdaptor"); 00054 codec=coderType; 00055 dprintf_full("ColorReductionAdaptor::ColorReductionAdaptor Codec %i\n",(int)coderType); 00056 }

ColorReductionAdaptor::~ColorReductionAdaptor  )  [virtual]
 

Destructor.

Definition at line 71 of file ColorReductionAdaptor.cpp.

00072 { 00073 }


Member Function Documentation

Adaptor * ColorReductionAdaptor::clone  )  [virtual]
 

Create a shallow copy of the Adaptor.

Creates an Adaptor with the same setup (without copying the current status).

Returns:
An Adaptor object.

Reimplemented from VideoAdaptorChain.

Definition at line 75 of file ColorReductionAdaptor.cpp.

References ColorReductionAdaptor().

00076 { 00077 return new ColorReductionAdaptor(es,keyFrameInterval,targetBitrate,codec); 00078 }

void ColorReductionAdaptor::initialize  )  [virtual]
 

Initialize internal data structures.

Reimplemented from AdaptorChain.

Definition at line 58 of file ColorReductionAdaptor.cpp.

References AdaptorChain::addAdaptor().

00059 { 00060 if(initialized) 00061 return; 00062 00063 addAdaptor(new MP4Decoder(es, false, UncompressedVideoFrame::ColorSpaceI420, codec)); 00064 addAdaptor(new YUVColorReductionAdaptor(es)); 00065 if(targetBitrate==0 || targetBitrate>es->getAvgBandwidth()) 00066 targetBitrate=es->getAvgBandwidth() * 80 / 100; 00067 addAdaptor(new MP4Encoder(es, targetBitrate, (int)es->getFPS(), keyFrameInterval, 0 /*BVOPs*/, UncompressedVideoFrame::ColorSpaceI420, codec)); 00068 initialized = true; 00069 };


The documentation for this class was generated from the following files: