videoeditorengine/vedengine/videoprocessor/inc/yuv2rgb12.h
branchRCL_3
changeset 3 e0b5df5c0969
parent 0 951a5db380a0
child 5 4c409de21d23
equal deleted inserted replaced
0:951a5db380a0 3:e0b5df5c0969
     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 * YUV to EColor4K colorspace converter concrete classes. 
       
    17 *
       
    18 */
       
    19 
       
    20     
       
    21 
       
    22 #ifndef     __YUV2RGB12_H__
       
    23 #define     __YUV2RGB12_H__
       
    24 
       
    25 
       
    26 //  INCLUDES
       
    27 
       
    28 #ifndef __YUVCONVERTER_H__
       
    29 #include "yuvconverter.h"
       
    30 #endif
       
    31 
       
    32 
       
    33 //  CLASS DEFINITIONS
       
    34 
       
    35 // Normal YUV to Rgb12 with dither
       
    36 class CYuv2Rgb12 : public CYuvConverter
       
    37 {
       
    38 public: // CYuvConverter methods
       
    39     // Constructors & destructor
       
    40     CYuv2Rgb12();
       
    41     ~CYuv2Rgb12();
       
    42     void ConstructL(TUint aWidth, TUint aHeight, TUint aMaxWidth, TUint aMaxHeight);
       
    43     void SetGamma(TInt aGamma);
       
    44     void SetBrightnessContrast(TInt aBCIndex);
       
    45     void Convert(const TUint8 *aYBuf, const TUint8 *aUBuf,
       
    46                  const TUint8 *aVBuf,
       
    47                  TUint aBufWidth, TUint aBufHeight,
       
    48                  TUint8 *aTarget, TUint aTargetScanlineLength);
       
    49 
       
    50 protected: // Data
       
    51     enum
       
    52     {
       
    53         ESaturateOffset = 222,    //saturation table offset; min value (when U == 0, Y == 0) is -222 
       
    54         ESaturateLength = 476+12+ESaturateOffset  //table length; max value (when U == 255, Y == 255) is 476+12(dither)
       
    55     };
       
    56     TUint8 *iRgbLookupTable; // RGB clamp/gamma lookup table
       
    57     TUint iWidth, iHeight, iCropWidth, iCropHeight;
       
    58     TInt iGamma;
       
    59     TInt iBrightnessContrast;
       
    60 };
       
    61 
       
    62 
       
    63 
       
    64 
       
    65 #endif      //  __YUV2RGB12_H__
       
    66             
       
    67 // End of File