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