1 #ifndef _EXYNOS_SCALERBLEND_H_
2 #define _EXYNOS_SCALERBLEND_H_
3 
4 #include "libscaler-v4l2.h"
5 
6 class CScalerBlendV4L2 : public CScalerV4L2 {
7 
8 public:
9        CScalerBlendV4L2(int instance, int allow_drm);
10        ~CScalerBlendV4L2();
11        struct SrcBlendInfo m_SrcBlndCfg;
12 
13        // H/W Control
14        virtual bool DevSetCtrl();
15 
16        void GetCustomAlphaBlendFmt(int32_t &src_color_space,
17 			                             unsigned int srcblendfmt);
18 
SetSrcBlendOp(SRC_BL_OP op)19        inline void SetSrcBlendOp(SRC_BL_OP op) {
20                m_SrcBlndCfg.blop = op;
21                SetFlag(m_fStatus, SCF_SRC_BLEND);
22        }
23 
SetSrcBlendHPos(int srcblendhpos)24        inline void SetSrcBlendHPos(int srcblendhpos) {
25                m_SrcBlndCfg.srcblendhpos = srcblendhpos;
26        }
27 
SetSrcBlendVPos(int srcblendvpos)28        inline void SetSrcBlendVPos(int srcblendvpos) {
29                m_SrcBlndCfg.srcblendvpos = srcblendvpos;
30        }
31 
SetSrcBlendPremulti(int srcblendpremulti)32        inline void SetSrcBlendPremulti(int srcblendpremulti) {
33                m_SrcBlndCfg.srcblendpremulti = srcblendpremulti;
34        }
35 
SetSrcBlendFmt(int srcblendfmt)36        inline void SetSrcBlendFmt(int srcblendfmt) {
37                m_SrcBlndCfg.srcblendfmt = srcblendfmt;
38        }
39 
SetSrcBlendStride(int srcblendstride)40        inline void SetSrcBlendStride(int srcblendstride) {
41                m_SrcBlndCfg.srcblendstride = srcblendstride;
42        }
43 
SetSrcBlendWidth(int srcblendwidth)44        inline void SetSrcBlendWidth(int srcblendwidth) {
45                m_SrcBlndCfg.srcblendwidth= srcblendwidth;
46        }
47 
SetSrcBlendHeight(int srcblendheight)48        inline void SetSrcBlendHeight(int srcblendheight) {
49                m_SrcBlndCfg.srcblendheight = srcblendheight;
50        }
51 
SetSrcGlobalAlpha(int globalalpha,bool enable)52        inline void SetSrcGlobalAlpha(int globalalpha, bool enable) {
53               m_SrcBlndCfg.globalalpha.enable = enable;
54               m_SrcBlndCfg.globalalpha.val = globalalpha;
55        }
56 
SetSrcBlendCSCSpace(bool enable,enum colorspace space,bool wide)57        inline void SetSrcBlendCSCSpace(bool enable,
58                                       enum colorspace space, bool wide) {
59                m_SrcBlndCfg.cscspec.enable = enable;
60                m_SrcBlndCfg.cscspec.space = space;
61                m_SrcBlndCfg.cscspec.wide = wide;
62        }
63 };
64 #endif
65