1 /* |
|
2 * Copyright (c) 2010 Ixonos Plc. |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - Initial contribution |
|
11 * |
|
12 * Contributors: |
|
13 * Ixonos Plc |
|
14 * |
|
15 * Description: |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 //----IMAAMI---- |
|
21 //************************************************************************* |
|
22 //DisplayChain.cpp |
|
23 // |
|
24 //Version 1.00 |
|
25 // |
|
26 //Contains: |
|
27 // CDisplayChain |
|
28 // Image processing class implementing |
|
29 // display specific image processing: |
|
30 // - Scaling to display size with pan support |
|
31 // - IETD - display specific color contrast enhancement |
|
32 // - Sharpening |
|
33 // - Display feature compensation by simple color management |
|
34 // - Dithering |
|
35 // |
|
36 //History: |
|
37 // 30.10.2003 version 1.00 created using existing IMAAMI algorithms |
|
38 //************************************************************************* |
|
39 |
|
40 #ifndef __DisplayChain_H |
|
41 #define __DisplayChain_H |
|
42 |
|
43 #include <e32std.h> // for Fundamental Types |
|
44 #include <e32base.h> // for Fundamental Types |
|
45 #include <e32math.h> //for the calculation of exponents |
|
46 #include <stdio.h> |
|
47 |
|
48 #include "DCDigitalZoom.h" |
|
49 #include "DCSharpening.h" |
|
50 #include "DCIetd.h" |
|
51 #include "DCDithering.h" |
|
52 #include "DCColorManagement.h" |
|
53 #include "DCDefines.h" |
|
54 #include "DCInit.h" |
|
55 |
|
56 |
|
57 //Class definition |
|
58 class CDisplayChain : public CBase |
|
59 { |
|
60 public: |
|
61 |
|
62 //Standard functions |
|
63 CDisplayChain(); |
|
64 static CDisplayChain* NewL(); |
|
65 static CDisplayChain* NewLC(); |
|
66 ~CDisplayChain(); |
|
67 |
|
68 // Second Phase contructor (may leave) |
|
69 void ConstructL(); |
|
70 |
|
71 //Process original image and store result |
|
72 void ProcessL(const CFbsBitmap* InBitmap, CFbsBitmap* aTargetBitmap); |
|
73 |
|
74 //Processing parameters |
|
75 struct DisplayChainParams |
|
76 { |
|
77 TBool FirstOpening; |
|
78 |
|
79 TBool IetdON; //IETD ON/OFF |
|
80 TBool SharpeningON; //Sharpening ON/OFF |
|
81 TBool ColorManagementON; //Color Management ON/OFF |
|
82 TBool DitheringON; //Dithering ON/OFF |
|
83 TBool DigitalZoomON; //Scaling ON/OFF |
|
84 |
|
85 //Parameters for each processing algorithm |
|
86 //See processing algorithm classes for details. |
|
87 CDCIetd::DCIetdParameters IETDParameters; |
|
88 DCSharpening::DCSharpeningParams SharpeningParameters; |
|
89 CDCColorManagement::DCColorManagementParams ColorManagementParameters; |
|
90 CDCDigitalZoom::DCDigitalZoomParams DZParameters; |
|
91 }; |
|
92 |
|
93 //Parameter excange |
|
94 void SetParameters(DisplayChainParams* Parameters); |
|
95 void GetParameters(DisplayChainParams* Parameters); |
|
96 |
|
97 //Limit integer value to byte [0,255] |
|
98 static inline TUint8 Limit255(TInt i) {return (TUint8)(i<0?0:(i>255?255:i));} |
|
99 |
|
100 private: |
|
101 |
|
102 |
|
103 //PArameters |
|
104 DisplayChainParams Parameters; |
|
105 |
|
106 //Processing objects |
|
107 CDCIetd* IetdPtr; |
|
108 DCSharpening* SharpeningPtr; |
|
109 CDCColorManagement* ColorManagementPtr; |
|
110 CDCDithering* DitheringPtr; |
|
111 CDCDigitalZoom* DigitalZoomPtr; |
|
112 }; |
|
113 |
|
114 #endif // ifndef __DisplayChain_H |
|
115 //----IMAAMI---- |
|