|
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 for picture header decoding functions. |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 #ifndef _DECPICH_H_ |
|
24 #define _DECPICH_H_ |
|
25 |
|
26 /* |
|
27 * Includes |
|
28 */ |
|
29 |
|
30 #include "core.h" |
|
31 |
|
32 #include "biblin.h" |
|
33 |
|
34 |
|
35 /* |
|
36 * Defines |
|
37 */ |
|
38 |
|
39 // unify error codes |
|
40 #define DPH_OK H263D_OK /* everything ok */ |
|
41 |
|
42 #define DPH_OK_BUT_BIT_ERROR H263D_OK_BUT_BIT_ERROR /* bitstream corruption was detected */ |
|
43 #define DPH_OK_BUT_NOT_CODED H263D_OK_BUT_NOT_CODED /* the VOP is not_coded: no video data sent, |
|
44 only the timestamp -> skip the frame */ |
|
45 #define DPH_ERR H263D_ERROR /* a general error */ |
|
46 #define DPH_ERR_NO_INTRA H263D_ERROR_NO_INTRA /* no INTRA frame has been received */ |
|
47 #define DPH_ERR_FORMAT_CHANGE H263D_ERROR /* picture size change in bitstream */ |
|
48 |
|
49 |
|
50 /* |
|
51 * Structs and typedefs |
|
52 */ |
|
53 |
|
54 /* {{-output"dphInParam_t_info.txt" -ignore"*" -noCR}} |
|
55 This structure is used to pass input parameters to |
|
56 the dphGetPictureHeader function. |
|
57 {{-output"dphInParam_t_info.txt"}} */ |
|
58 |
|
59 /* {{-output"dphInParam_t.txt"}} */ |
|
60 typedef struct { |
|
61 int numStuffBits; /* Number of stuffing bits before PSC */ |
|
62 int fReadBits; /* 0, if picture header should not be read (use previous |
|
63 picture header but decode it using dphGetPictureHeader) */ |
|
64 int fNeedDecodedFrame; |
|
65 } dphInParam_t; |
|
66 /* {{-output"dphInParam_t.txt"}} */ |
|
67 |
|
68 |
|
69 /* {{-output"dphInOutParam_t_info.txt" -ignore"*" -noCR}} |
|
70 This structure is used to pass input parameters to |
|
71 the dphGetPictureHeader function. The function may modify |
|
72 the parameters (or the structures pointed by the parameters). |
|
73 {{-output"dphInOutParam_t_info.txt"}} */ |
|
74 |
|
75 /* {{-output"dphInOutParam_t.txt"}} */ |
|
76 typedef struct { |
|
77 vdcInstance_t *vdcInstance; /* Video Decoder Core instance */ |
|
78 bibBuffer_t *inBuffer; /* Bit Buffer instance */ |
|
79 bibBuffer_t *outBuffer; /* Out Bit Buffer instance data */ |
|
80 |
|
81 |
|
82 } dphInOutParam_t; |
|
83 /* {{-output"dphInOutParam_t.txt"}} */ |
|
84 |
|
85 |
|
86 /* {{-output"dphOutParam_t_info.txt" -ignore"*" -noCR}} |
|
87 The dphGetPictureHeader function uses this structure to return |
|
88 output parameters. |
|
89 {{-output"dphOutParam_t_info.txt"}} */ |
|
90 |
|
91 /* {{-output"dphOutParam_t.txt"}} */ |
|
92 typedef struct { |
|
93 int pquant; /* Initial quantizer */ |
|
94 int trp; /* Temporal Reference for Prediction, |
|
95 -1 if not indicated in the bitstream */ |
|
96 u_char *currYFrame; /* Memory buffer for new Y frame */ |
|
97 u_char *currUFrame; /* Memory buffer for new U frame */ |
|
98 u_char *currVFrame; /* Memory buffer for new V frame */ |
|
99 u_char *currYBFrame; /* New Y frame of B part of PB-frame */ |
|
100 u_char *currUBFrame; /* New U frame of B part of PB-frame */ |
|
101 u_char *currVBFrame; /* New V frame of B part of PB-frame */ |
|
102 } dphOutParam_t; |
|
103 /* {{-output"dphOutParam_t.txt"}} */ |
|
104 |
|
105 |
|
106 /* |
|
107 * Function prototypes |
|
108 */ |
|
109 |
|
110 int dphGetPictureHeader( |
|
111 const dphInParam_t *inParam, |
|
112 dphInOutParam_t *inOutParam, |
|
113 dphOutParam_t *outParam, |
|
114 int *bitErrorIndication); |
|
115 |
|
116 int dphGetSEI( |
|
117 vdcInstance_t *vdcInstance, /* Video Decoder Core instance */ |
|
118 bibBuffer_t *inBuffer, /* Bit Buffer instance */ |
|
119 int *bitErrorIndication); |
|
120 |
|
121 class CMPEG4Transcoder; |
|
122 int dphGetMPEGVolHeader(dphInOutParam_t *inOutParam, CMPEG4Transcoder *hTranscoder); |
|
123 |
|
124 int dphGetMPEGVopHeader( |
|
125 const dphInParam_t *inParam, |
|
126 dphInOutParam_t *inOutParam, |
|
127 dphOutParam_t *outParam, |
|
128 int *bitErrorIndication); |
|
129 |
|
130 #endif |
|
131 |
|
132 // End of file |