f614c833b7b3c3053b2cb2c6755fd5eb6a9f7f23
[platform/adaptation/ap_samsung/libomxil-e3250-v4l2.git] / openmax / component / video / dec / vc1 / Exynos_OMX_Wmvdec.h
1 /*
2  *
3  * Copyright 2012 Samsung Electronics S.LSI Co. LTD
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  *      http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17
18 /*
19  * @file       Exynos_OMX_Wmvdec.h
20  * @brief
21  * @author     HyeYeon Chung (hyeon.chung@samsung.com)
22  * @author     Satish Kumar Reddy (palli.satish@samsung.com)
23  * @version    2.0.0
24  * @history
25  *   2012.07.10 : Create
26  */
27
28 #ifndef EXYNOS_OMX_WMV_DEC_COMPONENT
29 #define EXYNOS_OMX_WMV_DEC_COMPONENT
30
31 #include "Exynos_OMX_Def.h"
32 #include "OMX_Component.h"
33 #include "OMX_Video.h"
34 #include "ExynosVideoApi.h"
35
36 #ifdef SLP_PLATFORM
37 #define BITMAPINFOHEADER_SIZE               0
38 #define BITMAPINFOHEADER_ASFBINDING_SIZE    1
39 #else
40 #define BITMAPINFOHEADER_SIZE               40
41 #define BITMAPINFOHEADER_ASFBINDING_SIZE    41
42 #endif
43 #define COMPRESSION_POS                     16
44
45 typedef enum WMV_FORMAT {
46     WMV_FORMAT_VC1,
47     WMV_FORMAT_WMV3,
48     WMV_FORMAT_UNKNOWN
49 } WMV_FORMAT;
50
51 /*
52  * This structure is the same as BitmapInfoHhr struct in pv_avifile_typedefs.h file
53  */
54 typedef struct _BitmapInfoHhr
55 {
56     OMX_U32    BiSize;
57     OMX_U32    BiWidth;
58     OMX_U32    BiHeight;
59     OMX_U16    BiPlanes;
60     OMX_U16    BiBitCount;
61     OMX_U32    BiCompression;
62     OMX_U32    BiSizeImage;
63     OMX_U32    BiXPelsPerMeter;
64     OMX_U32    BiYPelsPerMeter;
65     OMX_U32    BiClrUsed;
66     OMX_U32    BiClrImportant;
67 } BitmapInfoHhr;
68
69 typedef struct _EXYNOS_MFC_WMVDEC_HANDLE
70 {
71     OMX_HANDLETYPE hMFCHandle;
72     OMX_BOOL       bShareableBuf;
73     OMX_U32        indexTimestamp;
74     OMX_U32        outputIndexTimestamp;
75     OMX_BOOL       bConfiguredMFCSrc;
76     OMX_BOOL       bConfiguredMFCDst;
77     OMX_U32        maxDPBNum;
78     WMV_FORMAT     wmvFormat;
79
80     ExynosVideoColorFormatType MFCOutputColorType;
81     ExynosVideoDecOps         *pDecOps;
82     ExynosVideoDecBufferOps   *pInbufOps;
83     ExynosVideoDecBufferOps   *pOutbufOps;
84     ExynosVideoGeometry        codecOutbufConf;
85 } EXYNOS_MFC_WMVDEC_HANDLE;
86
87 typedef struct _EXYNOS_WMVDEC_HANDLE
88 {
89     /* OMX Codec specific */
90     OMX_VIDEO_PARAM_WMVTYPE WmvComponent[ALL_PORT_NUM];
91     OMX_VIDEO_PARAM_ERRORCORRECTIONTYPE errorCorrectionType[ALL_PORT_NUM];
92
93     /* EXYNOS MFC Codec specific */
94     EXYNOS_MFC_WMVDEC_HANDLE            hMFCWmvHandle;
95
96     OMX_BOOL bSourceStart;
97     OMX_BOOL bDestinationStart;
98     OMX_HANDLETYPE hSourceStartEvent;
99     OMX_HANDLETYPE hDestinationStartEvent;
100 #ifdef SLP_PLATFORM
101     WMV_FORMAT wmvFormat;
102 #endif
103 } EXYNOS_WMVDEC_HANDLE;
104
105 #ifdef __cplusplus
106 extern "C" {
107 #endif
108
109 OSCL_EXPORT_REF OMX_ERRORTYPE Exynos_OMX_ComponentInit(
110     OMX_HANDLETYPE hComponent,
111     OMX_STRING     componentName);
112 OMX_ERRORTYPE Exynos_OMX_ComponentDeinit(
113     OMX_HANDLETYPE hComponent);
114
115 OMX_ERRORTYPE WmvCodecSrcInit(OMX_COMPONENTTYPE *pOMXComponent);
116 OMX_ERRORTYPE WmvCodecDstSetup(OMX_COMPONENTTYPE *pOMXComponent);
117 OMX_ERRORTYPE WmvCodecCheckResolutionChange(OMX_COMPONENTTYPE *pOMXComponent);
118 #ifdef __cplusplus
119 };
120 #endif
121
122 #endif