1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/mm/mdfdevvideoextensions/nga_mdf_postprocessor/inc/common.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,106 @@
1.4 +/*
1.5 +* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of "Eclipse Public License v1.0"
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description:
1.18 +*
1.19 +*/
1.20 +
1.21 +#ifndef INCLUDE_COMMON
1.22 +#define INCLUDE_COMMON
1.23 +
1.24 +
1.25 +typedef signed char int8;
1.26 +typedef unsigned char uint8;
1.27 +typedef short int int16;
1.28 +typedef unsigned short int uint16;
1.29 +typedef int int32;
1.30 +typedef unsigned int uint32;
1.31 +
1.32 +typedef float flt32;
1.33 +typedef double flt64;
1.34 +
1.35 +typedef unsigned char tBool;
1.36 +typedef signed int tError;
1.37 +
1.38 +
1.39 +#define E_TRUE 1
1.40 +#define E_FALSE 0
1.41 +
1.42 +#define E_ON 1
1.43 +#define E_OFF 0
1.44 +
1.45 +#define E_DEBUG 1
1.46 +#define E_RELEASE 0
1.47 +
1.48 +#define E_SUCCESS 0
1.49 +#define E_FAILURE (-1)
1.50 +#define E_OUT_OF_MEMORY (-2)
1.51 +#define E_OUT_OF_RANGE (-3)
1.52 +#define E_FILE_CREATE_FAIL (-4)
1.53 +#define E_UNDEFINED_FLAG (-5)
1.54 +#define E_ERROR_ARGUMENT (-16)
1.55 +
1.56 +#define E_USER_ERROR_BASE (-1000)
1.57 +
1.58 +#define mIsSuccess(code) ((code)>=0)
1.59 +#define mIsFailure(code) ((code)<0)
1.60 +
1.61 +/* These define the srcImageFormats */
1.62 +#define EYuv420Chroma1_Planar 0x01
1.63 +#define EYuv420Chroma2_Planar 0x02
1.64 +#define EYuv420Chroma3_Planar 0x03
1.65 +#define EYuv422Chroma1_LE 0x04
1.66 +#define EYuv422Chroma2_LE 0x05
1.67 +#define EYuv422Chroma1_BE 0x06
1.68 +#define EYuv422Chroma2_BE 0x07
1.69 +
1.70 +/* These define the dstImageFormats */
1.71 +#define EBitmapColor4k_DitherOrdered 0x01
1.72 +#define EBitmapColor4k_DitherErrDiff 0x02
1.73 +#define EBitmapColor64k_DitherOrdered 0x03
1.74 +#define EBitmapColor64k_DitherErrDiff 0x04
1.75 +#define EBitmapColor16M 0x05
1.76 +#define EBitmapColor16MU 0x06
1.77 +
1.78 +/* These define the various color conversion schemes */
1.79 +#define EITU601_5_FULLRANGE 0X01
1.80 +#define EITU601_5_REDUCEDRANGE 0X02
1.81 +#define EB709_FULLRANGE 0X03
1.82 +#define EB709_REDUCEDRANGE 0X04
1.83 +
1.84 +#define COLOR_CONV_PRECISION 14
1.85 +#define COLOR_CONV_ROUND 8192
1.86 +/* This is the data structure for the output video frame buffer */
1.87 +typedef struct BaseVideoFrame
1.88 +{
1.89 + uint8 *lum; /* Luminance pointer */
1.90 + uint8 *cb; /* Cb pointer */
1.91 + uint8 *cr; /* Cr pointer */
1.92 + uint16 width; /* Width of the frame */
1.93 + uint16 height; /* Height of the frame */
1.94 + uint32 timeStamp; /* Playback Timestamp */
1.95 +
1.96 +} tBaseVideoFrame;
1.97 +
1.98 +typedef enum {YUV422INT_LE, YUV422INT_BE} EBufferLayout422;
1.99 +
1.100 +/* Crop window structure */
1.101 +typedef struct WndParam
1.102 +{
1.103 + uint16 xOffset;
1.104 + uint16 yOffset;
1.105 + uint32 wndWidth;
1.106 + uint32 wndHeight;
1.107 +}tWndParam;
1.108 +
1.109 +#endif /* INCLUDE_COMMON */