blob: 0c860d99b40ceff746eb9e14d2637b93fcca611e
1 | // |
2 | // |
3 | // amlogic 2015 |
4 | // |
5 | // @ Project : tv |
6 | // @ File Name : |
7 | // @ Date : 2015 -7 |
8 | // @ Author : hao.fu |
9 | // |
10 | // |
11 | |
12 | |
13 | #if !defined(_AUTOBACKLIGHT_H) |
14 | #define _AUTOBACKLIGHT_H |
15 | #include "../tvin/CTvin.h" |
16 | #include "../tvutils/CThread.h" |
17 | #include "../vpp/CVpp.h" |
18 | |
19 | class AutoBackLight: public CThread |
20 | { |
21 | private: |
22 | tv_source_input_type_t mAutoBacklightSource; |
23 | int mCur_source_default_backlight; |
24 | int mCur_sig_state; |
25 | bool mAutoBacklight_OnOff_Flag; |
26 | int mCurrent_backlight; |
27 | int mCur_dest_backlight; |
28 | |
29 | void adjustDstBacklight(); |
30 | void adjustBacklight(); |
31 | int HistogramGet_AVE(); |
32 | bool threadLoop(); |
33 | |
34 | public: |
35 | enum SIG_STATE { |
36 | SIG_STATE_STABLE = 1, |
37 | SIG_STATE_NOSIG = 2, |
38 | }; |
39 | CVpp *myVpp; |
40 | CTvin *myTvin; |
41 | |
42 | AutoBackLight( CVpp *mVpp, CTvin *pTvin ); |
43 | ~AutoBackLight(); |
44 | void updateSigState(int state); |
45 | void startAutoBacklight( tv_source_input_type_t source_type ); |
46 | void stopAutoBacklight(); |
47 | bool isAutoBacklightOn(); |
48 | }; |
49 | #endif |
50 |