Partially revert r20233, exp2f is not available on some BSDs, DOS and AVR32.
[FFMpeg-mirror/lagarith.git] / libavcodec / vaapi.h
blob07568a47fc0027b6518df7bc6c64db083530308a
1 /*
2 * Video Acceleration API (shared data between FFmpeg and the video player)
3 * HW decode acceleration for MPEG-2, MPEG-4, H.264 and VC-1
5 * Copyright (C) 2008-2009 Splitted-Desktop Systems
7 * This file is part of FFmpeg.
9 * FFmpeg is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
14 * FFmpeg is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with FFmpeg; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
24 #ifndef AVCODEC_VAAPI_H
25 #define AVCODEC_VAAPI_H
27 #include <stdint.h>
29 /**
30 * \defgroup VAAPI_Decoding VA API Decoding
31 * \ingroup Decoder
32 * @{
35 /**
36 * This structure is used to share data between the FFmpeg library and
37 * the client video application.
38 * This shall be zero-allocated and available as
39 * AVCodecContext.hwaccel_context. All user members can be set once
40 * during initialization or through each AVCodecContext.get_buffer()
41 * function call. In any case, they must be valid prior to calling
42 * decoding functions.
44 struct vaapi_context {
45 /**
46 * Window system dependent data
48 * - encoding: unused
49 * - decoding: Set by user
51 void *display;
53 /**
54 * Configuration ID
56 * - encoding: unused
57 * - decoding: Set by user
59 uint32_t config_id;
61 /**
62 * Context ID (video decode pipeline)
64 * - encoding: unused
65 * - decoding: Set by user
67 uint32_t context_id;
69 /**
70 * VAPictureParameterBuffer ID
72 * - encoding: unused
73 * - decoding: Set by libavcodec
75 uint32_t pic_param_buf_id;
77 /**
78 * VAIQMatrixBuffer ID
80 * - encoding: unused
81 * - decoding: Set by libavcodec
83 uint32_t iq_matrix_buf_id;
85 /**
86 * VABitPlaneBuffer ID (for VC-1 decoding)
88 * - encoding: unused
89 * - decoding: Set by libavcodec
91 uint32_t bitplane_buf_id;
93 /**
94 * Slice parameter/data buffer IDs
96 * - encoding: unused
97 * - decoding: Set by libavcodec
99 uint32_t *slice_buf_ids;
102 * Number of effective slice buffer IDs to send to the HW
104 * - encoding: unused
105 * - decoding: Set by libavcodec
107 unsigned int n_slice_buf_ids;
110 * Size of pre-allocated slice_buf_ids
112 * - encoding: unused
113 * - decoding: Set by libavcodec
115 unsigned int slice_buf_ids_alloc;
118 * Pointer to VASliceParameterBuffers
120 * - encoding: unused
121 * - decoding: Set by libavcodec
123 void *slice_params;
126 * Size of a VASliceParameterBuffer element
128 * - encoding: unused
129 * - decoding: Set by libavcodec
131 unsigned int slice_param_size;
134 * Size of pre-allocated slice_params
136 * - encoding: unused
137 * - decoding: Set by libavcodec
139 unsigned int slice_params_alloc;
142 * Number of slices currently filled in
144 * - encoding: unused
145 * - decoding: Set by libavcodec
147 unsigned int slice_count;
150 * Pointer to slice data buffer base
151 * - encoding: unused
152 * - decoding: Set by libavcodec
154 const uint8_t *slice_data;
157 * Current size of slice data
159 * - encoding: unused
160 * - decoding: Set by libavcodec
162 uint32_t slice_data_size;
165 /* @} */
167 #endif /* AVCODEC_VAAPI_H */