InterleavedYUVGenerator.h
Go to the documentation of this file.00001
00002 #ifndef INCLUDED_InterleavedYUVGenerator_h_
00003 #define INCLUDED_InterleavedYUVGenerator_h_
00004
00005 #include "Vision/FilterBankGenerator.h"
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 class InterleavedYUVGenerator : public FilterBankGenerator {
00024 public:
00025
00026 InterleavedYUVGenerator(unsigned int mysid, FilterBankGenerator* fbg, EventBase::EventTypeID_t tid);
00027
00028 InterleavedYUVGenerator(unsigned int mysid, unsigned int syc, unsigned int suc, unsigned int svc, FilterBankGenerator* fbg, EventBase::EventTypeID_t tid);
00029
00030
00031 virtual ~InterleavedYUVGenerator() {
00032 freeCaches();
00033 destruct();
00034 }
00035
00036 static const unsigned int CHAN_YUV=0;
00037
00038 static std::string getClassDescription() { return "Converts a FilterBankGenerator's data into interleaved format"; }
00039
00040
00041 virtual void doEvent();
00042
00043 virtual unsigned int getBinSize() const;
00044
00045 virtual unsigned int loadBuffer(const char buf[], unsigned int len, const char* filename=NULL);
00046
00047 virtual unsigned int saveBuffer(char buf[], unsigned int len) const;
00048
00049 virtual void freeCaches();
00050 virtual void invalidateCaches();
00051
00052 protected:
00053 virtual void setNumImages(unsigned int nLayers, unsigned int nChannels);
00054 virtual void setDimensions();
00055 virtual void destruct();
00056 virtual unsigned char * createImageCache(unsigned int layer, unsigned int chan) const;
00057 virtual void calcImage(unsigned int layer, unsigned int chan);
00058
00059 unsigned int srcYChan;
00060 unsigned int srcUChan;
00061 unsigned int srcVChan;
00062
00063 bool ** isAllocated;
00064
00065 private:
00066 InterleavedYUVGenerator(const InterleavedYUVGenerator& fbk);
00067 const InterleavedYUVGenerator& operator=(const InterleavedYUVGenerator& fbk);
00068 };
00069
00070
00071
00072
00073
00074
00075 #endif