]> git.kernelconcepts.de Git - karo-tx-redboot.git/blob - packages/devs/ipu/arm/imx/v1_0/include/xec_dls.h
TX51 pre-release
[karo-tx-redboot.git] / packages / devs / ipu / arm / imx / v1_0 / include / xec_dls.h
1 /*
2  * Copyright 2008 Freescale Semiconductor, Inc.
3  *
4  * All modifications are confidential and proprietary information
5  * of Freescale Semiconductor, Inc. ALL RIGHTS RESERVED.
6  *
7  */
8 /*!
9  * @file xec_dls.h
10  *
11  * @brief This file contains the XEC_LCD dls part declarations.
12  *
13  */
14 #ifndef __XEC_DLS_H__
15 #define __XEC_DLS_H__
16
17 #define SSIM_XSTEP 4
18 #define SSIM_YSTEP 4
19
20 /* default configures for xec dls algorithm */
21 #define XECDLS_frameStep                6
22 #define XECDLS_xStep                            4
23 #define XECDLS_yStep                            4
24 #define XECDLS_yMaxPrime                235
25 #define XECDLS_disTh                            500     /*xxxx = xx.xx */
26 #define XECDLS_blDeltaMax               30
27 #define XECDLS_alphaMax         138     /* 149 */
28 #define XECDLS_yRangeMax                255
29 #define XECDLS_yRangeMin                0
30 #define XECDLS_FFilter_Step     3
31 #define XECDLS_ALPHA_Step       109     /* gamma=2. or 108 if gamma=2.20 */
32 #define XECDLS_BLDelay                  20
33 #define XECDLS_BLStep                   3
34
35 enum XECDLS_FRAME_FORMAT {
36         XECDLS_YV12 = 0,
37         XECDLS_RGB888,
38         XECDLS_YUYV,
39 };
40
41 struct xecDlsFrameInfo {
42         unsigned char *framePointer;
43         int width;
44         int height;
45         int rectTop;
46         int rectBottom;
47         int rectLeft;
48         int rectRight;
49         int ambientBacklight;
50         enum XECDLS_FRAME_FORMAT frameFormat;
51         int bytesPerPixel;
52         int index;
53 };
54
55 struct xecDlsConfig {
56         int yMaxPrime;
57         int yRangeMin;
58         int yRangeMax;
59         int xStep;
60         int yStep;
61         int disThreshold;
62         int alphaMax;
63         int blDeltaMax;
64         int frameStep;
65         int blStep;
66         int blDelay;
67 };
68
69 struct xecDlsOutput {
70         unsigned short pendingAlpha;
71         int pendingBLChange;
72         int pending;
73 };
74 struct xec_dls_params{
75         int prevCurrent;
76         int curCurrent;
77         int diffCurrent;
78         int prevAlpha;
79         int curAlpha;
80         int diffAlpha;
81         int stepSize;
82         int stepNum;
83         int stepCounter;
84         int lastStep;
85 };
86
87 typedef struct image_block{
88         unsigned int startAddr;
89         int blockXSize;
90         int blockYSize;
91         int xStride;
92         int yStride;
93 }image_block_t;
94
95 void xec_dls_core_init(void);
96 void xec_dls_core(struct xecDlsFrameInfo g_xecDlsCoreFrameInfo);
97 void xec_dls_stream_init(void);
98 int xec_dls_perform(unsigned char *frame, int xSize, int ySize,
99                            int pixelformat, int index);
100 #endif
101