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 * A header file for the Video Decoder Engine Image Buffer abstract |
|
17 * data type. |
|
18 * |
|
19 */ |
|
20 |
|
21 |
|
22 #ifndef _VDEIMB_H_ |
|
23 #define _VDEIMB_H_ |
|
24 |
|
25 |
|
26 |
|
27 /* |
|
28 * Includes |
|
29 */ |
|
30 |
|
31 #include "renapi.h" |
|
32 #include "rendri.h" |
|
33 |
|
34 |
|
35 /* |
|
36 * Defines |
|
37 */ |
|
38 |
|
39 /* Displaying status */ |
|
40 #define VDEIMB_NO_DISPLAYING 1 |
|
41 #define VDEIMB_WAITING 2 |
|
42 #define VDEIMB_DISPLAYED 4 |
|
43 |
|
44 /* Full-picture freeze status, |
|
45 see vdeImb_t for description of the definitions */ |
|
46 #define VDEIMB_FPF_REQUEST 2 |
|
47 #define VDEIMB_FPF_RELEASE 1 |
|
48 #define VDEIMB_FPF_NOT_SPECIFIED 0 |
|
49 |
|
50 |
|
51 /* |
|
52 * Structures and typedefs |
|
53 */ |
|
54 |
|
55 /* {{-output"vdeImb_t_info.txt" -ignore"*" -noCR}} |
|
56 vdeImb_t defines the structure of a single image buffer which is capable |
|
57 of storing one YUV 4:2:0 image and a number of paramaters as |
|
58 side-information. The YUV image as well as the YUV to RGB conversion and |
|
59 displaying related parameters are kept in a renDrawItem_t structure. |
|
60 Decoder related parameters are stored in the vdeImb_t itself. |
|
61 One may directly refer to the member variables of the vdeImb_t structure. |
|
62 However, one should use the functions and macros in the Renderer Draw Item |
|
63 Interface for accessing the contents of the drawItem member of vdeImb_t. |
|
64 {{-output"vdeImb_t_info.txt"}} */ |
|
65 |
|
66 /* {{-output"vdeImb_t.txt"}} */ |
|
67 typedef struct { |
|
68 renDrawItem_t *drawItem; /* renderer draw item which actually contains |
|
69 the frame memory (and some parameters) */ |
|
70 |
|
71 int fReferenced; /* non-zero if the image buffer is going to be |
|
72 used as a reference frame. Otherwise, zero. */ |
|
73 |
|
74 int tr; /* the TR field of H.263 which is associated with |
|
75 the image buffer */ |
|
76 |
|
77 |
|
78 int trRef; /* Referenced for a TR prediction, |
|
79 0 if the frame is a normal picture referenced |
|
80 once at maximum (in the next picture), |
|
81 1 if the frame is referenced multiple times |
|
82 in the future frames. |
|
83 This information is used to update reference |
|
84 picture data structures. It is neede at least |
|
85 in streaming applications. */ |
|
86 |
|
87 int *yQuantParams; /* luminance quantizer parameter for each |
|
88 macroblock in scan-order */ |
|
89 |
|
90 int *uvQuantParams; /* chrominance quantizer parameter for each |
|
91 macroblock in scan-order */ |
|
92 |
|
93 } vdeImb_t; |
|
94 /* {{-output"vdeImb_t.txt"}} */ |
|
95 |
|
96 |
|
97 /* |
|
98 * Function prototypes |
|
99 */ |
|
100 |
|
101 vdeImb_t *vdeImbAlloc(int width, int height, int fYuvNeeded); |
|
102 |
|
103 int vdeImbCopyParameters(vdeImb_t *dstImb, const vdeImb_t *srcImb); |
|
104 |
|
105 void vdeImbDealloc(vdeImb_t *imb); |
|
106 |
|
107 |
|
108 /* |
|
109 * Macros |
|
110 */ |
|
111 |
|
112 /* {{-output"vdeImbYUV.txt"}} */ |
|
113 /* |
|
114 * vdeImbYUV |
|
115 * |
|
116 * Parameters: |
|
117 * vdeImb_t *pimb a pointer to image buffer |
|
118 * u_char **ppy, **ppu, **ppv used to return the pointers to the top-left |
|
119 * corner of Y, U and V image buffers |
|
120 * respectively |
|
121 * int *pWidth, *pHeight used to return the width and height of |
|
122 * the luminance image in pixels |
|
123 * |
|
124 * Function: |
|
125 * This function returns the Y, U and V pointers to the passed image buffer |
|
126 * as well as the dimensions of the luminance frame of the image buffer. |
|
127 * |
|
128 * Returns: |
|
129 * REN_OK if the function was successful |
|
130 * REN_ERROR indicating a general error |
|
131 * |
|
132 */ |
|
133 |
|
134 #define vdeImbYUV(pimb, ppy, ppu, ppv, pWidth, pHeight) \ |
|
135 renDriYUV((pimb)->drawItem, (ppy), (ppu), (ppv), (pWidth), (pHeight)) |
|
136 /* {{-output"vdeImbYUV.txt"}} */ |
|
137 |
|
138 #endif |
|
139 // End of File |
|