avprobe: also output dar/par if only defined in stream
[FFMpeg-mirror/mplayer-patches.git] / libavcodec / vaapi.h
blob39e88259d641a7d17c99e8f2d6966013d7ec6234
1 /*
2 * Video Acceleration API (shared data between Libav 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 Libav.
9 * Libav 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 * Libav 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 Libav; 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 /**
28 * @file
29 * @ingroup lavc_codec_hwaccel_vaapi
30 * Public libavcodec VA API header.
33 #include <stdint.h>
35 /**
36 * @defgroup lavc_codec_hwaccel_vaapi VA API Decoding
37 * @ingroup lavc_codec_hwaccel
38 * @{
41 /**
42 * This structure is used to share data between the Libav library and
43 * the client video application.
44 * This shall be zero-allocated and available as
45 * AVCodecContext.hwaccel_context. All user members can be set once
46 * during initialization or through each AVCodecContext.get_buffer()
47 * function call. In any case, they must be valid prior to calling
48 * decoding functions.
50 struct vaapi_context {
51 /**
52 * Window system dependent data
54 * - encoding: unused
55 * - decoding: Set by user
57 void *display;
59 /**
60 * Configuration ID
62 * - encoding: unused
63 * - decoding: Set by user
65 uint32_t config_id;
67 /**
68 * Context ID (video decode pipeline)
70 * - encoding: unused
71 * - decoding: Set by user
73 uint32_t context_id;
75 /**
76 * VAPictureParameterBuffer ID
78 * - encoding: unused
79 * - decoding: Set by libavcodec
81 uint32_t pic_param_buf_id;
83 /**
84 * VAIQMatrixBuffer ID
86 * - encoding: unused
87 * - decoding: Set by libavcodec
89 uint32_t iq_matrix_buf_id;
91 /**
92 * VABitPlaneBuffer ID (for VC-1 decoding)
94 * - encoding: unused
95 * - decoding: Set by libavcodec
97 uint32_t bitplane_buf_id;
99 /**
100 * Slice parameter/data buffer IDs
102 * - encoding: unused
103 * - decoding: Set by libavcodec
105 uint32_t *slice_buf_ids;
108 * Number of effective slice buffer IDs to send to the HW
110 * - encoding: unused
111 * - decoding: Set by libavcodec
113 unsigned int n_slice_buf_ids;
116 * Size of pre-allocated slice_buf_ids
118 * - encoding: unused
119 * - decoding: Set by libavcodec
121 unsigned int slice_buf_ids_alloc;
124 * Pointer to VASliceParameterBuffers
126 * - encoding: unused
127 * - decoding: Set by libavcodec
129 void *slice_params;
132 * Size of a VASliceParameterBuffer element
134 * - encoding: unused
135 * - decoding: Set by libavcodec
137 unsigned int slice_param_size;
140 * Size of pre-allocated slice_params
142 * - encoding: unused
143 * - decoding: Set by libavcodec
145 unsigned int slice_params_alloc;
148 * Number of slices currently filled in
150 * - encoding: unused
151 * - decoding: Set by libavcodec
153 unsigned int slice_count;
156 * Pointer to slice data buffer base
157 * - encoding: unused
158 * - decoding: Set by libavcodec
160 const uint8_t *slice_data;
163 * Current size of slice data
165 * - encoding: unused
166 * - decoding: Set by libavcodec
168 uint32_t slice_data_size;
171 /* @} */
173 #endif /* AVCODEC_VAAPI_H */