|
1 /* |
|
2 * Copyright (c) 2008 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef INCLUDE_COMMON |
|
19 #define INCLUDE_COMMON |
|
20 |
|
21 |
|
22 typedef signed char int8; |
|
23 typedef unsigned char uint8; |
|
24 typedef short int int16; |
|
25 typedef unsigned short int uint16; |
|
26 typedef int int32; |
|
27 typedef unsigned int uint32; |
|
28 |
|
29 typedef float flt32; |
|
30 typedef double flt64; |
|
31 |
|
32 typedef unsigned char tBool; |
|
33 typedef signed int tError; |
|
34 |
|
35 |
|
36 #define E_TRUE 1 |
|
37 #define E_FALSE 0 |
|
38 |
|
39 #define E_ON 1 |
|
40 #define E_OFF 0 |
|
41 |
|
42 #define E_DEBUG 1 |
|
43 #define E_RELEASE 0 |
|
44 |
|
45 #define E_SUCCESS 0 |
|
46 #define E_FAILURE (-1) |
|
47 #define E_OUT_OF_MEMORY (-2) |
|
48 #define E_OUT_OF_RANGE (-3) |
|
49 #define E_FILE_CREATE_FAIL (-4) |
|
50 #define E_UNDEFINED_FLAG (-5) |
|
51 #define E_ERROR_ARGUMENT (-16) |
|
52 |
|
53 #define E_USER_ERROR_BASE (-1000) |
|
54 |
|
55 #define mIsSuccess(code) ((code)>=0) |
|
56 #define mIsFailure(code) ((code)<0) |
|
57 |
|
58 /* These define the srcImageFormats */ |
|
59 #define EYuv420Chroma1_Planar 0x01 |
|
60 #define EYuv420Chroma2_Planar 0x02 |
|
61 #define EYuv420Chroma3_Planar 0x03 |
|
62 #define EYuv422Chroma1_LE 0x04 |
|
63 #define EYuv422Chroma2_LE 0x05 |
|
64 #define EYuv422Chroma1_BE 0x06 |
|
65 #define EYuv422Chroma2_BE 0x07 |
|
66 |
|
67 /* These define the dstImageFormats */ |
|
68 #define EBitmapColor4k_DitherOrdered 0x01 |
|
69 #define EBitmapColor4k_DitherErrDiff 0x02 |
|
70 #define EBitmapColor64k_DitherOrdered 0x03 |
|
71 #define EBitmapColor64k_DitherErrDiff 0x04 |
|
72 #define EBitmapColor16M 0x05 |
|
73 #define EBitmapColor16MU 0x06 |
|
74 |
|
75 /* These define the various color conversion schemes */ |
|
76 #define EITU601_5_FULLRANGE 0X01 |
|
77 #define EITU601_5_REDUCEDRANGE 0X02 |
|
78 #define EB709_FULLRANGE 0X03 |
|
79 #define EB709_REDUCEDRANGE 0X04 |
|
80 |
|
81 #define COLOR_CONV_PRECISION 14 |
|
82 #define COLOR_CONV_ROUND 8192 |
|
83 /* This is the data structure for the output video frame buffer */ |
|
84 typedef struct BaseVideoFrame |
|
85 { |
|
86 uint8 *lum; /* Luminance pointer */ |
|
87 uint8 *cb; /* Cb pointer */ |
|
88 uint8 *cr; /* Cr pointer */ |
|
89 uint16 width; /* Width of the frame */ |
|
90 uint16 height; /* Height of the frame */ |
|
91 uint32 timeStamp; /* Playback Timestamp */ |
|
92 |
|
93 } tBaseVideoFrame; |
|
94 |
|
95 typedef enum {YUV422INT_LE, YUV422INT_BE} EBufferLayout422; |
|
96 |
|
97 /* Crop window structure */ |
|
98 typedef struct WndParam |
|
99 { |
|
100 uint16 xOffset; |
|
101 uint16 yOffset; |
|
102 uint32 wndWidth; |
|
103 uint32 wndHeight; |
|
104 }tWndParam; |
|
105 |
|
106 #endif /* INCLUDE_COMMON */ |