Create Project for repo.or.cz
[vp.git] / src / pp / PostProcess.h
blob994bf8b5384b3c08db8cefc7797ddc045e74cb71
1 /*******************************************************************************
2 * File : src/pp/PostProcess.h
3 *
4 * Author : Henry He
5 * Created : Fri 30 Oct 2009 01:03:11 PM CST
6 * Description :
7 ******************************************************************************/
9 #ifndef __POSTPROCESS_INC_20091030_130311_HENRY__
10 #define __POSTPROCESS_INC_20091030_130311_HENRY__
13 /*******************************************************************************
14 * Desc : Includes Files
15 ******************************************************************************/
16 #include "utils/common.h"
17 #include "pp/s3c_pp.h"
20 /*******************************************************************************
21 * Desc : Macro Definations
22 ******************************************************************************/
25 //=========================== Error Code =====================================
27 #define POST_PROCESSOR_ERR_FAILED (-1)
28 #define POST_PROCESSOR_ERR_NOT_CREATED (-2)
29 #define POST_PROCESSOR_ERR_ALREADY_CREATED (-3)
30 #define POST_PROCESSOR_ERR_CANT_CREATE (-4)
34 /*******************************************************************************
35 * Desc : Type Definations
36 ******************************************************************************/
39 /*******************************************************************************
40 * Desc : Global Variables
41 ******************************************************************************/
44 /*******************************************************************************
45 * Desc : Functions
46 ******************************************************************************/
51 /******************************************************************************
52 * Class : PostProcessor
53 * Desc : Simple wrapper of /dev/misc/s3c-pp
54 ******************************************************************************/
56 class PostProcessor
59 public:
61 // ==================== LIFECYCLE =========================================
63 // Constructor of PostProcessor
64 PostProcessor ();
66 // Decontructor of PostProcessor
67 ~ PostProcessor ();
70 public:
72 // ==================== OPERATORS =========================================
74 // ==================== OPERATIONS =========================================
76 // Create instance of PostProcessor
77 int Create (const char *pcDevPath);
79 // Destroy this instance
80 void Destroy ();
82 // Set most parameter of /dev/misc/s3c-pp
83 int SetParam (
84 UINT32 unSrcWidthFull, UINT32 unSrcHeightFull,
85 UINT32 unSrcX, UINT32 unSrcY,
86 UINT32 unSrcWidth, UINT32 unSrcHeight, UINT32 unSrcColorSpace,
87 UINT32 unDstWidthFull, UINT32 unDstHeightFull,
88 UINT32 unDstX, UINT32 unDstY,
89 UINT32 unDstWidth, UINT32 unDstHeight, UINT32 unDstColorSpace);
91 // Convert and copy from pvSrcBuf to pvDstBuf (must be DMA memory space)
92 int Process (void * pvSrcBuf, void *pvDstBuf);
94 // ==================== ACCESS =========================================
97 private:
99 // ==================== OPERATIONS =========================================
102 private:
104 // ==================== MEMBER DATA =========================================
106 // Mutex of this instance
107 HLH_Mutex m_zhmMutex;
109 // Whether this instance created
110 bool m_bCreated;
112 // File discriptor of /dev/misc/s3c-pp
113 int m_fdPP;
115 // Whether parameter has been set
116 bool m_bSetParam;
118 // Parameter of /dev/misc/s3c-pp
119 s3c_pp_params_t m_zspParam;
122 }; // ----- end of class PostProcessor -----
126 #endif /* __POSTPROCESS_INC_20091030_130311_HENRY__ */