sl@0: /*
sl@0: * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
sl@0: * All rights reserved.
sl@0: * This component and the accompanying materials are made available
sl@0: * under the terms of "Eclipse Public License v1.0"
sl@0: * which accompanies this distribution, and is available
sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0: *
sl@0: * Initial Contributors:
sl@0: * Nokia Corporation - initial contribution.
sl@0: *
sl@0: * Contributors:
sl@0: *
sl@0: * Description:
sl@0: *
sl@0: */
sl@0: 
sl@0: #ifndef INCLUDE_COMMON
sl@0: #define INCLUDE_COMMON
sl@0: 
sl@0: 
sl@0: typedef signed char          int8;
sl@0: typedef unsigned char        uint8;
sl@0: typedef short int            int16;
sl@0: typedef unsigned short int   uint16;
sl@0: typedef int                  int32;
sl@0: typedef unsigned int         uint32;
sl@0: 
sl@0: typedef float                flt32;
sl@0: typedef double               flt64;
sl@0: 
sl@0: typedef unsigned char        tBool;
sl@0: typedef signed int           tError;
sl@0: 
sl@0: 
sl@0: #define E_TRUE               1
sl@0: #define E_FALSE              0
sl@0: 
sl@0: #define E_ON                 1
sl@0: #define E_OFF                0
sl@0: 
sl@0: #define E_DEBUG              1
sl@0: #define E_RELEASE            0
sl@0: 
sl@0: #define E_SUCCESS            0
sl@0: #define E_FAILURE           (-1)
sl@0: #define E_OUT_OF_MEMORY     (-2)
sl@0: #define E_OUT_OF_RANGE      (-3)
sl@0: #define E_FILE_CREATE_FAIL  (-4)
sl@0: #define E_UNDEFINED_FLAG    (-5)
sl@0: #define E_ERROR_ARGUMENT	  (-16)
sl@0: 
sl@0: #define E_USER_ERROR_BASE   (-1000)
sl@0: 
sl@0: #define mIsSuccess(code)    ((code)>=0)
sl@0: #define mIsFailure(code)    ((code)<0)
sl@0: 
sl@0: /* These define the srcImageFormats */
sl@0: #define EYuv420Chroma1_Planar		0x01
sl@0: #define EYuv420Chroma2_Planar		0x02
sl@0: #define EYuv420Chroma3_Planar		0x03
sl@0: #define EYuv422Chroma1_LE   0x04
sl@0: #define EYuv422Chroma2_LE   0x05
sl@0: #define EYuv422Chroma1_BE   0x06
sl@0: #define EYuv422Chroma2_BE   0x07
sl@0: 
sl@0: /* These define the dstImageFormats */
sl@0: #define EBitmapColor4k_DitherOrdered	0x01
sl@0: #define EBitmapColor4k_DitherErrDiff	0x02
sl@0: #define EBitmapColor64k_DitherOrdered	0x03
sl@0: #define EBitmapColor64k_DitherErrDiff	0x04
sl@0: #define EBitmapColor16M					0x05
sl@0: #define EBitmapColor16MU				0x06
sl@0: 
sl@0: /* These define the various color conversion schemes */
sl@0: #define EITU601_5_FULLRANGE		0X01
sl@0: #define EITU601_5_REDUCEDRANGE	0X02
sl@0: #define EB709_FULLRANGE			0X03
sl@0: #define EB709_REDUCEDRANGE		0X04
sl@0: 
sl@0: #define COLOR_CONV_PRECISION    14
sl@0: #define COLOR_CONV_ROUND        8192
sl@0: /* This is the data structure for the output video frame buffer */
sl@0: typedef struct BaseVideoFrame
sl@0: {
sl@0:     uint8  *lum;       /* Luminance pointer */
sl@0: 		uint8  *cb;        /* Cb pointer */
sl@0: 		uint8  *cr;        /* Cr pointer */
sl@0: 		uint16  width;     /* Width of the frame */
sl@0: 		uint16  height;    /* Height of the frame */
sl@0: 		uint32  timeStamp; /* Playback Timestamp */
sl@0: 
sl@0: } tBaseVideoFrame;
sl@0: 
sl@0: typedef enum {YUV422INT_LE, YUV422INT_BE} EBufferLayout422; 
sl@0: 
sl@0: /* Crop window structure */
sl@0: typedef struct WndParam
sl@0: {  
sl@0: 	uint16 xOffset;    
sl@0: 	uint16 yOffset;
sl@0: 	uint32 wndWidth;
sl@0: 	uint32 wndHeight;
sl@0: }tWndParam;
sl@0: 
sl@0: #endif  /* INCLUDE_COMMON */