videoeditorengine/vedengine/GenManip/inc/DCColorManagement.h
changeset 0 951a5db380a0
equal deleted inserted replaced
-1:000000000000 0:951a5db380a0
       
     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 //DCColorManagement.h
       
    23 //
       
    24 //Version 1.00
       
    25 //
       
    26 //Contains:
       
    27 //	CDCCDM 
       
    28 //		Simple color management approach consisting
       
    29 //		of 3xLUT + 3x3 Matrix + 3xLUT for compensating
       
    30 //		display specific features.
       
    31 //	
       
    32 //History:
       
    33 //	19.08.2003 version 1.00 created using existing IMAAMI algorithms	
       
    34 //*************************************************************************
       
    35 
       
    36 
       
    37 #ifndef __DCColorManagement_H
       
    38 #define __DCColorManagement_H
       
    39 
       
    40 #include <e32std.h> // for Fundamental Types
       
    41 #include <e32base.h> // for Fundamental Types
       
    42 #include <e32math.h> //for the calculation of exponents
       
    43 
       
    44 //Class definition
       
    45 class CDCColorManagement : public CBase
       
    46 {
       
    47 
       
    48 public:
       
    49 
       
    50 	//Parameter struct definition
       
    51 	struct DCColorManagementParams
       
    52 	{
       
    53 		//Gamma de-correction (linearization) LUTs
       
    54 		//Pointers to actual data
       
    55 		TInt *GammaR;
       
    56 		TInt *GammaG;
       
    57 		TInt *GammaB;
       
    58 		
       
    59 		//3x3 color space modification matrix
       
    60 		//Pointer to actual data
       
    61 		TInt *Matrix;
       
    62 		
       
    63 		//Tone rendering curves = display compensation LUTs
       
    64 		//Pointers to actual data
       
    65 		TInt *TRCR;
       
    66 		TInt *TRCG;
       
    67 		TInt *TRCB;
       
    68 	};
       
    69 
       
    70 	//Gamma de-correction (linearization) LUTs
       
    71 	TInt iGammaR[256];
       
    72 	TInt iGammaG[256];
       
    73 	TInt iGammaB[256];
       
    74 	
       
    75 	//3x3 color space modification matrix
       
    76 	TInt iMatrix[9];
       
    77 
       
    78 	//Tone rendering curves = display compensation LUTs
       
    79 	TInt iTRCR[256];
       
    80 	TInt iTRCG[256];
       
    81 	TInt iTRCB[256];
       
    82 
       
    83 	//Standard class member functions
       
    84 	CDCColorManagement();
       
    85 	static CDCColorManagement* NewL();
       
    86 	static CDCColorManagement* NewLC();
       
    87 	~CDCColorManagement();
       
    88 	void ConstructL();
       
    89 	
       
    90 	//Process original image and store result
       
    91 	void ProcessL(CFbsBitmap* aBPtr);
       
    92 
       
    93 	//Set processing parameters
       
    94 	void SetParameters(DCColorManagementParams* params);
       
    95 	
       
    96 	//Get current processing parameters
       
    97 	void GetParameters(DCColorManagementParams* params);
       
    98 
       
    99 	//Limit integer value to byte [0,255]
       
   100 	static inline TUint8 Limit255(TInt i) {return (TUint8)(i<0?0:(i>255?255:i));}
       
   101 	
       
   102 private:
       
   103 	
       
   104 	// Line Buffer and pointer
       
   105 	HBufC8*	iScanLine;
       
   106 	
       
   107 	//Processing parameters
       
   108 	DCColorManagementParams iParams;
       
   109 
       
   110 };
       
   111 
       
   112 #endif // ifndef __DCColorManagement_H
       
   113 //----IMAAMI----