1 /*
2  INTEL CONFIDENTIAL
3  Copyright 2009 Intel Corporation All Rights Reserved.
4  The source code contained or described herein and all documents related to the source code ("Material") are owned by Intel Corporation or its suppliers or licensors. Title to the Material remains with Intel Corporation or its suppliers and licensors. The Material contains trade secrets and proprietary and confidential information of Intel or its suppliers and licensors. The Material is protected by worldwide copyright and trade secret laws and treaty provisions. No part of the Material may be used, copied, reproduced, modified, published, uploaded, posted, transmitted, distributed, or disclosed in any way without Intel’s prior express written permission.
5 
6  No license under any patent, copyright, trade secret or other intellectual property right is granted to or conferred upon you by disclosure or delivery of the Materials, either expressly, by implication, inducement, estoppel or otherwise. Any license under such intellectual property rights must be express and approved by Intel in writing.
7  */
8 
9 #ifndef __MIX_VIDEO_DEF_H__
10 #define __MIX_VIDEO_DEF_H__
11 #include <mixresult.h>
12 
13 /*
14  * MI-X video error code
15  */
16 typedef enum {
17 	MIX_RESULT_FRAME_NOTAVAIL = MIX_RESULT_ERROR_VIDEO_START + 1,
18 	MIX_RESULT_EOS,
19 	MIX_RESULT_POOLEMPTY,
20 	MIX_RESULT_OUTOFSURFACES,
21 	MIX_RESULT_DROPFRAME,
22 	MIX_RESULT_NOTIMPL,
23 	MIX_RESULT_VIDEO_LAST
24 } MIX_VIDEO_ERROR_CODE;
25 
26 /*
27  MixCodecMode
28  */
29 typedef enum {
30 	MIX_CODEC_MODE_ENCODE = 0,
31 	MIX_CODEC_MODE_DECODE,
32 	MIX_CODEC_MODE_LAST
33 } MixCodecMode;
34 
35 typedef enum {
36 	MIX_FRAMEORDER_MODE_DISPLAYORDER = 0,
37 	MIX_FRAMEORDER_MODE_DECODEORDER,
38 	MIX_FRAMEORDER_MODE_LAST
39 } MixFrameOrderMode;
40 
41 typedef struct _MixIOVec {
42 	guchar *data;
43 	gint buffer_size;
44     gint data_size;
45 } MixIOVec;
46 
47 typedef struct _MixRect {
48 	gshort x;
49 	gshort y;
50 	gushort width;
51 	gushort height;
52 } MixRect;
53 
54 typedef enum {
55 	MIX_STATE_UNINITIALIZED = 0,
56 	MIX_STATE_INITIALIZED,
57 	MIX_STATE_CONFIGURED,
58 	MIX_STATE_LAST
59 } MixState;
60 
61 
62 typedef enum
63 {
64     MIX_RAW_TARGET_FORMAT_NONE = 0,
65     MIX_RAW_TARGET_FORMAT_YUV420 = 1,
66     MIX_RAW_TARGET_FORMAT_YUV422 = 2,
67     MIX_RAW_TARGET_FORMAT_YUV444 = 4,
68     MIX_RAW_TARGET_FORMAT_PROTECTED = 0x80000000,
69     MIX_RAW_TARGET_FORMAT_LAST
70 } MixRawTargetFormat;
71 
72 
73 typedef enum
74 {
75     MIX_ENCODE_TARGET_FORMAT_MPEG4 = 0,
76     MIX_ENCODE_TARGET_FORMAT_H263 = 2,
77     MIX_ENCODE_TARGET_FORMAT_H264 = 4,
78     MIX_ENCODE_TARGET_FORMAT_PREVIEW = 8,
79     MIX_ENCODE_TARGET_FORMAT_LAST
80 } MixEncodeTargetFormat;
81 
82 
83 typedef enum
84 {
85     MIX_RATE_CONTROL_NONE = 1,
86     MIX_RATE_CONTROL_CBR = 2,
87     MIX_RATE_CONTROL_VBR = 4,
88     MIX_RATE_CONTROL_LAST
89 } MixRateControl;
90 
91 typedef enum
92 {
93     MIX_PROFILE_MPEG2SIMPLE = 0,
94     MIX_PROFILE_MPEG2MAIN,
95     MIX_PROFILE_MPEG4SIMPLE,
96     MIX_PROFILE_MPEG4ADVANCEDSIMPLE,
97     MIX_PROFILE_MPEG4MAIN,
98     MIX_PROFILE_H264BASELINE,
99     MIX_PROFILE_H264MAIN,
100     MIX_PROFILE_H264HIGH,
101     MIX_PROFILE_VC1SIMPLE,
102     MIX_PROFILE_VC1MAIN,
103     MIX_PROFILE_VC1ADVANCED,
104     MIX_PROFILE_H263BASELINE
105 } MixProfile;
106 
107 typedef enum
108 {
109     MIX_DELIMITER_LENGTHPREFIX = 0,
110     MIX_DELIMITER_ANNEXB
111 } MixDelimiterType;
112 
113 
114 #endif /*  __MIX_VIDEO_DEF_H__ */
115