00001 00038 #ifndef _YUV420TORGBCONVERTER_H 00039 #define _YUV420TORGBCONVERTER_H 00040 00041 #pragma once 00042 00043 #ifdef _BUILD_FOR_SHORT 00044 typedef short yuvType; 00045 #else 00046 typedef signed char yuvType ; 00047 #endif 00048 00049 /* 00050 =========================================================================== 00051 Class definition. 00052 =========================================================================== 00053 */ 00054 class YUV420toRGBConverter 00055 { 00056 public: 00057 // Construction and destruction. 00058 YUV420toRGBConverter(void) {_width = 0; _height = 0; _rotate = 0;} 00059 YUV420toRGBConverter(int width, int height) {_width = width; _height = height; _rotate = 0;} 00060 virtual ~YUV420toRGBConverter(void) {} 00061 00062 // Interface. 00063 virtual void Convert(void* pY, void* pU, void* pV, void* pRgb) = 0; 00064 00065 // Member interface. 00066 int GetWidth(void) { return(_width); } 00067 int GetHeight(void) { return(_height); } 00068 int GetRotate(void) { return(_rotate); } 00069 00070 void SetDimensions(int width, int height) {_width = width; _height = height;} 00071 void SetRotate(int rotate) { _rotate = rotate;} 00072 00073 protected: 00074 // Members. 00075 int _width; 00076 int _height; 00077 int _rotate; 00078 00079 };//end YUV420toRGBConverter. 00080 00081 00082 #endif // _YUV420TORGBCONVERTER_H