|
1 /* |
|
2 * Copyright (c) 2010 Ixonos Plc. |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the "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 * Ixonos Plc |
|
14 * |
|
15 * Description: |
|
16 * Header file for Video packet decoding module. |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 |
|
22 #ifndef _DECVP_MPEG_H_ |
|
23 #define _DECVP_MPEG_H_ |
|
24 |
|
25 #include "core.h" |
|
26 #include "vdcmvc.h" |
|
27 #include "vdeims.h" |
|
28 |
|
29 |
|
30 /* |
|
31 * Defines |
|
32 */ |
|
33 |
|
34 // unify error codes |
|
35 #define DGOB_OK_BUT_FRAME_USELESS H263D_OK_BUT_FRAME_USELESS |
|
36 #define DGOB_OK_BUT_BIT_ERROR H263D_OK_BUT_BIT_ERROR |
|
37 #define DGOB_OK H263D_OK |
|
38 #define DGOB_ERR H263D_ERROR |
|
39 |
|
40 |
|
41 /* |
|
42 * Structs and typedefs |
|
43 */ |
|
44 |
|
45 /* {{-output"dvpMarkVPCompleted_t_info.txt" -ignore"*" -noCR}} |
|
46 This structure is used to pass parameters to |
|
47 the dvpMarkVPCompleted function. |
|
48 {{-output"dvpMarkVPCompleted_t_info.txt"}} */ |
|
49 |
|
50 /* {{-output"dvpMarkVPCompleted_t.txt"}} */ |
|
51 typedef struct { |
|
52 int numMBsInVP; /* Number of macroblocks within the VP */ |
|
53 |
|
54 int xPosInMBs; /* x position of the first MB in the VP */ |
|
55 |
|
56 int yPosInMBs; /* y position of the first MB in the VP */ |
|
57 |
|
58 int widthInMBs; /* Image width in macroblocks */ |
|
59 |
|
60 int fSegmentCorrupted; /* Non-zero if the reported GOBs are |
|
61 corrupted. Otherwise zero. */ |
|
62 |
|
63 |
|
64 } dvpMarkVPCompleted_t; |
|
65 /* {{-output"dvpMarkVPCompleted_t.txt"}} */ |
|
66 |
|
67 |
|
68 /* {{-output"dvpVPInParam_t_info.txt" -ignore"*" -noCR}} |
|
69 This structure is used to pass input parameters to |
|
70 the dvpGetAndDecodeVideoPacketHeader and |
|
71 dvpGetAndDecodeVideoPacketContents functions. |
|
72 {{-output"dvpVPInParam_t_info.txt"}} */ |
|
73 |
|
74 /* {{-output"dvpVPInParam_t.txt"}} */ |
|
75 typedef struct { |
|
76 |
|
77 vdcPictureParam_t *pictParam; /* Picture attributes */ |
|
78 |
|
79 bibBuffer_t *inBuffer; /* Bit Buffer instance */ |
|
80 |
|
81 bibBuffer_t *outBuffer; /* Out Bit Buffer instance data */ |
|
82 |
|
83 bibBufferEdit_t *bufEdit; |
|
84 int iColorEffect; |
|
85 TBool iGetDecodedFrame; |
|
86 |
|
87 u_char fVOPHeaderCorrupted; /* If non-zero, the VOP header was detected |
|
88 to be erronous and the HEC information is |
|
89 used for updating */ |
|
90 |
|
91 } dvpVPInParam_t; |
|
92 /* {{-output"dvpVPInParam_t.txt"}} */ |
|
93 |
|
94 |
|
95 /* {{-output"dvpVPInOutParam_t_info.txt" -ignore"*" -noCR}} |
|
96 This structure is used to pass input parameters to |
|
97 the dvpGetAndDecodeVideoPacketHeader and dvpGetAndDecodeVideoPacketContents |
|
98 functions. The functions may modify the parameters (or the structures |
|
99 pointed by the parameters). |
|
100 {{-output"dvpVPInOutParam_t_info.txt"}} */ |
|
101 |
|
102 /* {{-output"dvpVPInOutParam_t.txt"}} */ |
|
103 typedef struct { |
|
104 |
|
105 int currMBNum; /* the number of the next expected MB to decode */ |
|
106 |
|
107 int frameNum; /* the calculated frame number */ |
|
108 |
|
109 int quant; /* QP for the next MB */ |
|
110 |
|
111 u_char *fCodedMBs; /* array for coded macroblock flags in |
|
112 scan-order, 1 = coded, 0 = not coded */ |
|
113 |
|
114 int numOfCodedMBs; /* number of coded macroblocks */ |
|
115 |
|
116 int *quantParams; /* array of quantization parameters for |
|
117 macroblocks in scan-order */ |
|
118 |
|
119 mvcData_t *mvcData; /* Motion Vector Count module instance data */ |
|
120 |
|
121 aicData_t *aicData; /* Advanced Intra Coding module instance data */ |
|
122 |
|
123 vdeIms_t *imageStore; /* VDE Image Store instance data */ |
|
124 |
|
125 u_char *refY; /* Reference frame */ |
|
126 u_char *refU; |
|
127 u_char *refV; |
|
128 |
|
129 u_char *currPY; /* Current P (or I) frame */ |
|
130 u_char *currPU; |
|
131 u_char *currPV; |
|
132 |
|
133 /* MVE */ |
|
134 int StartByteIndex; |
|
135 int StartBitIndex; |
|
136 |
|
137 } dvpVPInOutParam_t; |
|
138 /* {{-output"dvpVPInOutParam_t.txt"}} */ |
|
139 |
|
140 /* |
|
141 * Functions prototypes |
|
142 */ |
|
143 |
|
144 int dvpGetAndDecodeVideoPacketHeader( |
|
145 const dvpVPInParam_t *inParam, |
|
146 dvpVPInOutParam_t *inOutParam); |
|
147 |
|
148 int dvpGetAndDecodeVideoPacketContents( |
|
149 const dvpVPInParam_t *inParam, |
|
150 int fGetNewReferenceFrame, |
|
151 dvpVPInOutParam_t *inOutParam, CMPEG4Transcoder *hTranscoder); |
|
152 |
|
153 int dvpMarkVPCompleted(dvpMarkVPCompleted_t *inParam); |
|
154 |
|
155 #endif |
|
156 // End of File |