Main Page | Namespace List | Compound List | File List | Compound Members | File Members

pfspdbe.h

Go to the documentation of this file.
00001 /*--------------------------------------------------------------------
00002  *
00003  * (C) Copyright Koninklijke Philips Electronics NV 2006. 
00004  * All rights reserved. This software is licensed under the terms of
00005  * version 2.1 of the GNU Lesser General Public License as published 
00006  * by the Free Software Foundation. For licensing and warranty
00007  * information, see the file COPYING in the main directory.
00008  *
00009  *------------------------------------------------------------------*/
00010 
00011 #ifndef PFSPDBE_H
00012 #define PFSPDBE_H
00013 
00014 #include "yapi.h"
00015 #include "vya.h"
00016 #include "cpfspd.h"
00017 
00018 #define PFSPD_BITS         8 // PFSPD uses 8 bits per pixel
00019 #define UV_OFFSET        128 // PFSPD expects U and V to range from 0..255
00020 #define Y_RGB_CVBS_MIN     0 // minimum Y value
00021 #define Y_RGB_CVBS_MAX   255 // maximum Y value
00022 #define UV_MIN          -128 // minimum UV value
00023 #define UV_MAX           127 // maximum UV value
00024 
00025 typedef unsigned char   byte;
00026 
00027 class pfspdBE : public VYAprocess
00028 {
00029 public:
00030     // constructor
00031     pfspdBE(
00032         const Id&             n,
00033         VYAbitPrecision       Y_RGB_CVBSinPrecision,
00034         VYAbitPrecision       UVinPrecision,
00035 
00036         In<VYAfileName>&      fileNameInF,
00037         In<pT_header>&        seqInfoInF,
00038         In<VYApixel>&         Y_R_CVBSinF,
00039         In<VYApixel>&         U_GinF,
00040         In<VYApixel>&         V_BinF,
00041         In<VYAimageWidth>&    Y_RGBimgWidthInF,
00042         In<VYAimageHeight>&   Y_RGBimgHeightInF,
00043         In<VYAimageWidth>&    UVimgWidthInF,
00044         In<VYAimageHeight>&   UVimgHeightInF,
00045         In<VYAimageType>&     Y_YUV_RGBimgTypeInF
00046     );
00047 
00048     //destructors
00049 
00050     //type member function
00051     const char* type() const { return "pfspdBE"; }
00052 
00053     //main member function
00054     void main ();
00055 
00056 private:
00057     // input ports
00058     InPort<VYAfileName>       fileNameInP;
00059     InPort<pT_header>         seqInfoInP;
00060     InPort<VYApixel>          Y_R_CVBSinP;
00061     InPort<VYApixel>          U_GinP;
00062     InPort<VYApixel>          V_BinP;
00063     InPort<VYAimageWidth>     Y_RGBimgWidthInP;
00064     InPort<VYAimageHeight>    Y_RGBimgHeightInP;
00065     InPort<VYAimageWidth>     UVimgWidthInP;
00066     InPort<VYAimageHeight>    UVimgHeightInP;
00067     InPort<VYAimageType>      Y_YUV_RGBimgTypeInP;
00068 
00069     // member variables
00070     VYAbitPrecision           Y_RGB_CVBSinPrec, UVinPrec;
00071     VYAfileName               fileNameIn;
00072 
00073     // member functions
00074     void printInfo(bool interlaced, pT_color colorFormat, int nrOutFrames,
00075             int Y_RGBframeWidth, int Y_RGBframeHeight,
00076             int Y_RGB_CVBSscaleFactor, int UVscaleFactor);
00077     void checkParameter(int parameterIn, int parameter, char *name);
00078     void createLineBuffers(pT_color colorFormat,
00079             int Y_RGBimgWidth, int UVimgWidth,
00080             VYApixel **Y_R_CVBSbuf, VYApixel **U_Gbuf, VYApixel **V_Bbuf);
00081     void createImageBuffers(pT_color colorFormat,
00082             int Y_RGBimgWidth, int Y_RGBimgHeight,
00083             int UVimgWidth, int UVimgHeight,
00084             byte **CVBSbuf, byte **Ybuf, byte **Ubuf, byte **Vbuf, byte **UVbuf,
00085             byte **Rbuf, byte **Gbuf, byte **Bbuf);
00086     void deleteLineBuffers(pT_color colorFormat,
00087             VYApixel **Y_R_CVBSbuf, VYApixel **U_Gbuf, VYApixel **V_Bbuf);
00088     void deleteImageBuffers(pT_color colorFormat,
00089             byte **CVBSbuf, byte **Ybuf, byte **Ubuf, byte **Vbuf, byte **UVbuf,
00090             byte **Rbuf, byte **Gbuf, byte **Bbuf);
00091 };
00092 
00093 #endif

Generated on Wed Feb 15 14:52:43 2006 for pfspdfebe by doxygen 1.3.2