Codec Engine Application Programming Interface (API)
ce-w08
Main Page
Modules
Data Structures
Files
Related Pages
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
cetools
packages
ti
xdais
dm
xdm.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2006-2012, Texas Instruments Incorporated
3
* All rights reserved.
4
*
5
* Redistribution and use in source and binary forms, with or without
6
* modification, are permitted provided that the following conditions
7
* are met:
8
*
9
* * Redistributions of source code must retain the above copyright
10
* notice, this list of conditions and the following disclaimer.
11
*
12
* * Redistributions in binary form must reproduce the above copyright
13
* notice, this list of conditions and the following disclaimer in the
14
* documentation and/or other materials provided with the distribution.
15
*
16
* * Neither the name of Texas Instruments Incorporated nor the names of
17
* its contributors may be used to endorse or promote products derived
18
* from this software without specific prior written permission.
19
*
20
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
*
32
*/
33
46
#ifndef ti_xdais_dm_XDM_
47
#define ti_xdais_dm_XDM_
48
49
#include <
ti/xdais/ialg.h
>
50
#include <
ti/xdais/xdas.h
>
51
52
#ifdef __cplusplus
53
extern
"C"
{
54
#endif
55
58
59
#define XDM_EOK IALG_EOK
60
#define XDM_EFAIL IALG_EFAIL
61
#define XDM_EUNSUPPORTED -3
64
#ifdef XDM_INCLUDE_DOT9_SUPPORT
65
73
#define XDM_ERUNTIME -2
74
#endif
75
76
#define XDM_MAX_IO_BUFFERS 16
160
typedef struct XDM_BufDesc {
161
XDAS_Int8
**bufs;
164
XDAS_Int32
numBufs
;
165
XDAS_Int32
*
bufSizes
;
166
}
XDM_BufDesc
;
167
168
172
typedef
struct
XDM_SingleBufDesc
{
173
XDAS_Int8
*
buf
;
174
XDAS_Int32
bufSize
;
175
}
XDM_SingleBufDesc
;
176
177
178
182
typedef
struct
XDM1_SingleBufDesc
{
183
XDAS_Int8
*
buf
;
184
XDAS_Int32
bufSize
;
185
XDAS_Int32
accessMask
;
211
}
XDM1_SingleBufDesc
;
212
213
221
typedef
union
{
222
struct
{
223
XDAS_Int32
width
;
224
XDAS_Int32
height
;
225
} tileMem;
226
XDAS_Int32
bytes
;
227
}
XDM2_BufSize
;
228
237
typedef
struct
XDM2_SingleBufDesc
{
238
XDAS_Int8
*
buf
;
239
XDAS_Int16
memType
;
243
XDAS_Int16
usageMode
;
253
XDM2_BufSize
bufSize
;
254
XDAS_Int32
accessMask
;
280
}
XDM2_SingleBufDesc
;
281
282
286
typedef
struct
XDM1_BufDesc
{
287
XDAS_Int32
numBufs
;
292
XDM1_SingleBufDesc
descs
[
XDM_MAX_IO_BUFFERS
];
295
}
XDM1_BufDesc
;
296
305
typedef
struct
XDM2_BufDesc
{
306
XDAS_Int32
numBufs
;
311
XDM2_SingleBufDesc
descs
[
XDM_MAX_IO_BUFFERS
];
314
}
XDM2_BufDesc
;
315
316
336
typedef
enum
{
337
XDM_ACCESSMODE_READ
= 0,
343
XDM_ACCESSMODE_WRITE
= 1
349
}
XDM_AccessMode
;
350
351
362
#define XDM_ISACCESSMODE_READ(x) (((x) >> XDM_ACCESSMODE_READ) & 0x1)
363
364
375
#define XDM_ISACCESSMODE_WRITE(x) (((x) >> XDM_ACCESSMODE_WRITE) & 0x1)
376
377
388
#define XDM_CLEARACCESSMODE_READ(x) ((x) &= (~(0x1 << XDM_ACCESSMODE_READ)))
389
390
401
#define XDM_CLEARACCESSMODE_WRITE(x) ((x) &= (~(0x1 << XDM_ACCESSMODE_WRITE)))
402
403
413
#define XDM_SETACCESSMODE_READ(x) ((x) |= (0x1 << XDM_ACCESSMODE_READ))
414
415
425
#define XDM_SETACCESSMODE_WRITE(x) ((x) |= (0x1 << XDM_ACCESSMODE_WRITE))
426
427
431
typedef
struct
XDM1_AlgBufInfo
{
432
XDAS_Int32
minNumInBufs
;
433
XDAS_Int32
minNumOutBufs
;
434
XDM2_BufSize
minInBufSize
[
XDM_MAX_IO_BUFFERS
];
437
XDM2_BufSize
minOutBufSize
[
XDM_MAX_IO_BUFFERS
];
440
XDAS_Int32
inBufMemoryType
[
XDM_MAX_IO_BUFFERS
];
445
XDAS_Int32
outBufMemoryType
[
XDM_MAX_IO_BUFFERS
];
450
XDAS_Int32
minNumBufSets
;
455
}
XDM1_AlgBufInfo
;
456
457
461
typedef
struct
XDM_AlgBufInfo
{
462
XDAS_Int32
minNumInBufs
;
463
XDAS_Int32
minNumOutBufs
;
464
XDAS_Int32
minInBufSize
[
XDM_MAX_IO_BUFFERS
];
467
XDAS_Int32
minOutBufSize
[
XDM_MAX_IO_BUFFERS
];
470
}
XDM_AlgBufInfo
;
471
472
487
#define XDM_CUSTOMENUMBASE 0x100
488
489
506
#define XDM_CUSTOMCMDBASE 0x100
507
527
typedef
enum
{
528
XDM_GETSTATUS
= 0,
541
XDM_SETPARAMS
= 1,
542
XDM_RESET
= 2,
546
XDM_SETDEFAULT
= 3,
569
XDM_FLUSH
= 4,
585
XDM_GETBUFINFO
= 5,
599
XDM_GETVERSION
= 6,
607
XDM_GETCONTEXTINFO
= 7,
613
XDM_GETDYNPARAMSDEFAULT
= 8,
643
XDM_SETLATEACQUIREARG
= 9,
651
XDM_MOVEBUFS
= 10
702
}
XDM_CmdId
;
703
704
723
typedef
enum
{
724
XDM_PARAMSCHANGE
= 8,
736
XDM_APPLIEDCONCEALMENT
= 9,
749
XDM_INSUFFICIENTDATA
= 10,
766
XDM_CORRUPTEDDATA
= 11,
776
XDM_CORRUPTEDHEADER
= 12,
790
XDM_UNSUPPORTEDINPUT
= 13,
810
XDM_UNSUPPORTEDPARAM
= 14,
831
XDM_FATALERROR
= 15
853
}
XDM_ErrorBit
;
854
856
#define XDM_ISFATALERROR(x) (((x) >> XDM_FATALERROR) & 0x1)
857
858
#define XDM_ISUNSUPPORTEDPARAM(x) (((x) >> XDM_UNSUPPORTEDPARAM) & 0x1)
859
860
#define XDM_ISUNSUPPORTEDINPUT(x) (((x) >> XDM_UNSUPPORTEDINPUT) & 0x1)
861
862
#define XDM_ISCORRUPTEDHEADER(x) (((x) >> XDM_CORRUPTEDHEADER) & 0x1)
863
864
#define XDM_ISCORRUPTEDDATA(x) (((x) >> XDM_CORRUPTEDDATA) & 0x1)
865
866
#define XDM_ISINSUFFICIENTDATA(x) (((x) >> XDM_INSUFFICIENTDATA) & 0x1)
867
868
#define XDM_ISAPPLIEDCONCEALMENT(x) (((x) >> XDM_APPLIEDCONCEALMENT) & 0x1)
869
871
#define XDM_SETFATALERROR(x) ((x) |= (0x1 << XDM_FATALERROR))
872
873
#define XDM_SETUNSUPPORTEDPARAM(x) ((x) |= (0x1 << XDM_UNSUPPORTEDPARAM))
874
875
#define XDM_SETUNSUPPORTEDINPUT(x) ((x) |= (0x1 << XDM_UNSUPPORTEDINPUT))
876
877
#define XDM_SETCORRUPTEDHEADER(x) ((x) |= (0x1 << XDM_CORRUPTEDHEADER))
878
879
#define XDM_SETCORRUPTEDDATA(x) ((x) |= (0x1 << XDM_CORRUPTEDDATA))
880
881
#define XDM_SETINSUFFICIENTDATA(x) ((x) |= (0x1 << XDM_INSUFFICIENTDATA))
882
883
#define XDM_SETAPPLIEDCONCEALMENT(x) ((x) |= (0x1 << XDM_APPLIEDCONCEALMENT))
884
885
893
typedef
enum
{
894
XDM_BYTE
= 1,
895
XDM_LE_16
= 2,
896
XDM_LE_32
= 3,
897
XDM_LE_64
= 4,
898
XDM_BE_16
= 5,
899
XDM_BE_32
= 6,
900
XDM_BE_64
= 7
901
}
XDM_DataFormat
;
902
903
907
typedef
struct
XDM2_MoveBufDesc
{
908
XDAS_Int32
id
;
909
XDM2_BufDesc
bufDesc
;
910
}
XDM2_MoveBufDesc
;
911
912
916
typedef
struct
XDM_Date
{
917
XDAS_Int32
msecsOfDay
;
918
XDAS_Int32
month
;
919
XDAS_Int32
dayOfMonth
;
920
XDAS_Int32
dayOfWeek
;
921
XDAS_Int32
year
;
922
}
XDM_Date
;
923
924
928
typedef
struct
XDM_Point
{
929
XDAS_Int32
x
;
930
XDAS_Int32
y
;
931
}
XDM_Point
;
932
933
937
typedef
struct
XDM_Rect
{
938
XDM_Point
topLeft
;
939
XDM_Point
bottomRight
;
940
}
XDM_Rect
;
941
945
#define XDM_MAX_CONTEXT_BUFFERS 32
946
947
951
typedef
struct
XDM_ContextInfo
{
952
XDAS_Int32
minContextSize
;
955
XDAS_Int32
minIntermediateBufSizes
[
XDM_MAX_CONTEXT_BUFFERS
];
964
}
XDM_ContextInfo
;
965
966
970
typedef
struct
XDM_Context
{
971
XDM1_SingleBufDesc
algContext
;
978
XDAS_Int32
numInBufs
;
979
XDAS_Int32
numOutBufs
;
980
XDAS_Int32
numInOutBufs
;
981
XDM1_SingleBufDesc
inBufs
[
XDM_MAX_CONTEXT_BUFFERS
];
986
XDM1_SingleBufDesc
outBufs
[
XDM_MAX_CONTEXT_BUFFERS
];
991
XDM1_SingleBufDesc
inOutBufs
[
XDM_MAX_CONTEXT_BUFFERS
];
997
XDM1_SingleBufDesc
intermediateBufs
[
XDM_MAX_CONTEXT_BUFFERS
];
1022
}
XDM_Context
;
1023
1024
1032
typedef
enum
{
1033
XDM_DEFAULT
= 0,
1037
XDM_HIGH_QUALITY
= 1,
1038
XDM_HIGH_SPEED
= 2,
1039
XDM_USER_DEFINED
= 3,
1042
XDM_HIGH_SPEED_MED_QUALITY
= 4,
1045
XDM_MED_SPEED_MED_QUALITY
= 5,
1048
XDM_MED_SPEED_HIGH_QUALITY
= 6,
1052
XDM_ENCODING_PRESET_MAX
= 7,
1053
XDM_PRESET_DEFAULT
=
XDM_MED_SPEED_MED_QUALITY
1058
}
XDM_EncodingPreset
;
1059
1060
1068
typedef
enum
{
1069
XDM_DECODE_AU
= 0,
1072
XDM_PARSE_HEADER
= 1
1073
}
XDM_DecMode
;
1074
1075
1083
typedef
enum
{
1084
XDM_ENCODE_AU
= 0,
1087
XDM_GENERATE_HEADER
= 1
1088
}
XDM_EncMode
;
1089
1090
1098
typedef
enum
{
1099
XDM_CHROMA_NA
= -1,
1100
XDM_YUV_420P
= 1,
1101
XDM_YUV_422P
= 2,
1102
XDM_YUV_422IBE
= 3,
1103
XDM_YUV_422ILE
= 4,
1104
XDM_YUV_444P
= 5,
1105
XDM_YUV_411P
= 6,
1106
XDM_GRAY
= 7,
1107
XDM_RGB
= 8,
1108
XDM_YUV_420SP
= 9,
1111
XDM_ARGB8888
= 10,
1112
XDM_RGB555
= 11,
1113
XDM_RGB565
= 12,
1114
XDM_YUV_444ILE
= 13,
1116
XDM_CHROMAFORMAT_DEFAULT
=
XDM_YUV_422ILE
1117
}
XDM_ChromaFormat
;
1118
1119
1127
typedef
enum
{
1128
XDM_MEMTYPE_ROW
= 0,
1142
XDM_MEMTYPE_RAW
= 0,
1146
XDM_MEMTYPE_TILED8
= 1,
1147
XDM_MEMTYPE_TILED16
= 2,
1148
XDM_MEMTYPE_TILED32
= 3,
1149
XDM_MEMTYPE_TILEDPAGE
= 4
1150
}
XDM_MemoryType
;
1151
1152
1158
typedef
enum
{
1159
XDM_MEMUSAGE_DATASYNC
= 0
1178
}
XDM_MemoryUsageMode
;
1179
1180
1185
typedef
struct
XDM_DataSyncDesc
{
1186
XDAS_Int32
size
;
1187
XDAS_Int32
scatteredBlocksFlag
;
1209
XDAS_Int32
*
baseAddr
;
1226
XDAS_Int32
numBlocks
;
1227
XDAS_Int32
varBlockSizesFlag
;
1233
XDAS_Int32
*
blockSizes
;
1247
}
XDM_DataSyncDesc
;
1248
1249
1258
typedef
Void *
XDM_DataSyncHandle
;
1259
1260
1277
typedef
Void (*
XDM_DataSyncPutFxn
)(
XDM_DataSyncHandle
dataSyncHandle,
1278
XDM_DataSyncDesc
*dataSyncDesc);
1279
1302
typedef
XDAS_Int32
(*
XDM_DataSyncGetFxn
)(
XDM_DataSyncHandle
dataSyncHandle,
1303
XDM_DataSyncDesc
*dataSyncDesc);
1304
1338
typedef
XDAS_Int32
(*
XDM_DataSyncGetBufferFxn
)(
XDM_DataSyncHandle
dataSyncHandle,
1339
XDM_DataSyncDesc
*dataSyncDesc);
1340
1341
1357
typedef
XDAS_Int32
(*
XDM_DataSyncPutBufferFxn
)(
XDM_DataSyncHandle
dataSyncHandle,
1358
XDM_DataSyncDesc
*dataSyncDesc);
1359
1363
#ifdef __cplusplus
1364
}
1365
#endif
1366
1367
#endif
/* ti_xdais_dm_XDM_ */
Copyright 2013, Texas Instruments Incorporated