33
|
1 |
/*
|
|
2 |
* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "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 |
*
|
|
14 |
* Description: YUV to EColor16M colorspace converter concrete classes
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef __YUV2RGB24_H__
|
|
19 |
#define __YUV2RGB24_H__
|
|
20 |
|
|
21 |
// INCLUDES
|
|
22 |
#include <e32base.h>
|
|
23 |
|
|
24 |
// CLASS DEFINITIONS
|
|
25 |
|
|
26 |
// Normal YUV to Rgb24
|
|
27 |
class CYuv2Rgb24 : public CBase
|
|
28 |
{
|
|
29 |
public: // CYuvConverter methods
|
|
30 |
// Constructors & destructor
|
|
31 |
CYuv2Rgb24();
|
|
32 |
~CYuv2Rgb24();
|
|
33 |
void ConstructL(TUint aWidth, TUint aHeight, TUint aMaxWidth, TUint aMaxHeight);
|
|
34 |
|
|
35 |
void SetGamma(TInt aGamma);
|
|
36 |
void SetBrightnessContrast(TInt aBCIndex);
|
|
37 |
void Convert(const TUint8 *aYBuf, const TUint8 *aUBuf,
|
|
38 |
const TUint8 *aVBuf,
|
|
39 |
TUint aBufWidth, TUint aBufHeight,
|
|
40 |
TUint8 *aTarget, TUint aTargetScanlineLength);
|
|
41 |
|
|
42 |
protected: // Data
|
|
43 |
enum
|
|
44 |
{
|
|
45 |
ESaturateOffset = 276, // saturation table offset
|
|
46 |
ESaturateLength = 561+ESaturateOffset // table length
|
|
47 |
};
|
|
48 |
TUint8 *iRgbLookupTable; // RGB clamp/gamma lookup table
|
|
49 |
TUint iWidth, iHeight, iCropWidth, iCropHeight;
|
|
50 |
TInt iGamma;
|
|
51 |
TInt iBrightnessContrast;
|
|
52 |
};
|
|
53 |
|
|
54 |
#endif // __YUV2RGB24_H__
|
|
55 |
|
|
56 |
// End of File
|