annotate lib/libavcodec/dxva2.h @ 2134:992d2e6f907d

preparation for libavcodec
author zipi
date Tue, 31 Dec 2013 14:52:14 +0000
parents
children
rev   line source
2134
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
1 /*
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
2 * DXVA2 HW acceleration
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
3 *
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
4 * copyright (c) 2009 Laurent Aimar
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
5 *
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
6 * This file is part of FFmpeg.
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
7 *
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
8 * FFmpeg is free software; you can redistribute it and/or
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
9 * modify it under the terms of the GNU Lesser General Public
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
10 * License as published by the Free Software Foundation; either
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
11 * version 2.1 of the License, or (at your option) any later version.
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
12 *
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
13 * FFmpeg is distributed in the hope that it will be useful,
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
16 * Lesser General Public License for more details.
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
17 *
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
18 * You should have received a copy of the GNU Lesser General Public
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
19 * License along with FFmpeg; if not, write to the Free Software
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
21 */
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
22
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
23 #ifndef AVCODEC_DXVA_H
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
24 #define AVCODEC_DXVA_H
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
25
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
26 /**
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
27 * @file
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
28 * @ingroup lavc_codec_hwaccel_dxva2
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
29 * Public libavcodec DXVA2 header.
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
30 */
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
31
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
32 #if defined(_WIN32_WINNT) && _WIN32_WINNT < 0x0600
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
33 #undef _WIN32_WINNT
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
34 #endif
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
35
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
36 #if !defined(_WIN32_WINNT)
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
37 #define _WIN32_WINNT 0x0600
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
38 #endif
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
39
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
40 #include <stdint.h>
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
41 #include <d3d9.h>
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
42 #include <dxva2api.h>
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
43
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
44 /**
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
45 * @defgroup lavc_codec_hwaccel_dxva2 DXVA2
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
46 * @ingroup lavc_codec_hwaccel
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
47 *
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
48 * @{
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
49 */
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
50
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
51 #define FF_DXVA2_WORKAROUND_SCALING_LIST_ZIGZAG 1 ///< Work around for DXVA2 and old UVD/UVD+ ATI video cards
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
52
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
53 /**
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
54 * This structure is used to provides the necessary configurations and data
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
55 * to the DXVA2 FFmpeg HWAccel implementation.
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
56 *
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
57 * The application must make it available as AVCodecContext.hwaccel_context.
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
58 */
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
59 struct dxva_context {
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
60 /**
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
61 * DXVA2 decoder object
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
62 */
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
63 IDirectXVideoDecoder *decoder;
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
64
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
65 /**
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
66 * DXVA2 configuration used to create the decoder
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
67 */
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
68 const DXVA2_ConfigPictureDecode *cfg;
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
69
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
70 /**
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
71 * The number of surface in the surface array
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
72 */
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
73 unsigned surface_count;
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
74
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
75 /**
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
76 * The array of Direct3D surfaces used to create the decoder
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
77 */
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
78 LPDIRECT3DSURFACE9 *surface;
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
79
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
80 /**
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
81 * A bit field configuring the workarounds needed for using the decoder
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
82 */
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
83 uint64_t workaround;
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
84
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
85 /**
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
86 * Private to the FFmpeg AVHWAccel implementation
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
87 */
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
88 unsigned report_id;
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
89 };
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
90
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
91 /**
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
92 * @}
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
93 */
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
94
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
95 #endif /* AVCODEC_DXVA_H */