summaryrefslogtreecommitdiff
path: root/libscaler/libscalerblend-v4l2.h
blob: a7d7741592e556eb0bdcf3909ebf1aef9530b647 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#ifndef _EXYNOS_SCALERBLEND_H_
#define _EXYNOS_SCALERBLEND_H_

#include "libscaler-v4l2.h"

class CScalerBlendV4L2 : public CScalerV4L2 {

public:
       CScalerBlendV4L2(int instance, int allow_drm);
       ~CScalerBlendV4L2();
       struct SrcBlendInfo m_SrcBlndCfg;

       // H/W Control
       virtual bool DevSetCtrl();

       void GetCustomAlphaBlendFmt(int32_t &src_color_space,
			                             unsigned int srcblendfmt);

       inline void SetSrcBlendOp(SRC_BL_OP op) {
               m_SrcBlndCfg.blop = op;
               SetFlag(m_fStatus, SCF_SRC_BLEND);
       }

       inline void SetSrcBlendHPos(int srcblendhpos) {
               m_SrcBlndCfg.srcblendhpos = srcblendhpos;
       }

       inline void SetSrcBlendVPos(int srcblendvpos) {
               m_SrcBlndCfg.srcblendvpos = srcblendvpos;
       }

       inline void SetSrcBlendPremulti(int srcblendpremulti) {
               m_SrcBlndCfg.srcblendpremulti = srcblendpremulti;
       }

       inline void SetSrcBlendFmt(int srcblendfmt) {
               m_SrcBlndCfg.srcblendfmt = srcblendfmt;
       }

       inline void SetSrcBlendStride(int srcblendstride) {
               m_SrcBlndCfg.srcblendstride = srcblendstride;
       }

       inline void SetSrcBlendWidth(int srcblendwidth) {
               m_SrcBlndCfg.srcblendwidth= srcblendwidth;
       }

       inline void SetSrcBlendHeight(int srcblendheight) {
               m_SrcBlndCfg.srcblendheight = srcblendheight;
       }

       inline void SetSrcGlobalAlpha(int globalalpha, bool enable) {
              m_SrcBlndCfg.globalalpha.enable = enable;
              m_SrcBlndCfg.globalalpha.val = globalalpha;
       }

       inline void SetSrcBlendCSCSpace(bool enable,
                                      enum colorspace space, bool wide) {
               m_SrcBlndCfg.cscspec.enable = enable;
               m_SrcBlndCfg.cscspec.space = space;
               m_SrcBlndCfg.cscspec.wide = wide;
       }
};
#endif