comparison vdpau_render.h @ 8522:f8c091bb5779 libavcodec

Add VDPAU hardware accelerated decoding for H264 which can be used by video players. Original patch by NVIDIA corporation.
author cehoyos
date Sun, 04 Jan 2009 23:55:27 +0000
parents
children 2f94b161f9f7
comparison
equal deleted inserted replaced
8521:42179b2cfd09 8522:f8c091bb5779
1 /*
2 * Video Decode and Presentation API for UNIX (VDPAU) is used for
3 * HW decode acceleration for MPEG-1/2, H.264 and VC-1.
4 *
5 * Copyright (C) 2008 NVIDIA.
6 *
7 * This file is part of FFmpeg.
8 *
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.
13 *
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.
18 *
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
22 */
23
24 #ifndef AVCODEC_VDPAU_RENDER_H
25 #define AVCODEC_VDPAU_RENDER_H
26
27 /**
28 * \defgroup Decoder VDPAU Decoder and Renderer
29 *
30 * VDPAU HW acceleration has two modules
31 * - VDPAU Decoding
32 * - VDPAU Presentation
33 *
34 * VDPAU decoding module parses all headers using FFmpeg
35 * parsing mechanism and uses VDPAU for the actual decoding.
36 *
37 * As per the current implementation, the actual decoding
38 * and rendering (API calls) are done as part of VDPAU
39 * presentation (vo_vdpau.c) module.
40 *
41 * @{
42 * \defgroup VDPAU_Decoding VDPAU Decoding
43 * \ingroup Decoder
44 * @{
45 */
46
47 #include "vdpau/vdpau.h"
48 #include "vdpau/vdpau_x11.h"
49
50 /**
51 * \brief The videoSurface is used for render.
52 */
53 #define FF_VDPAU_STATE_USED_FOR_RENDER 1
54
55 /**
56 * \brief The videoSurface is needed for reference/prediction,
57 * codec manipulates this.
58 */
59 #define FF_VDPAU_STATE_USED_FOR_REFERENCE 2
60
61 /**
62 * \brief This structure is used as a CALL-BACK between the ffmpeg
63 * decoder (vd_) and presentation (vo_) module.
64 * This is used for defining a video-frame containing surface,
65 * picture-parameter, bitstream informations etc which are passed
66 * between ffmpeg decoder and its clients.
67 */
68 struct vdpau_render_state
69 VdpVideoSurface surface; ///< used as rendered surface, never changed.
70
71 int state; ///< Holds FF_VDPAU_STATE_* values
72
73 /** Picture Parameter information for all supported codecs */
74 union _VdpPictureInfo {
75 VdpPictureInfoH264 h264;
76 } info;
77
78 /** Describe size/location of the compressed video data */
79 int bitstreamBuffersAlloced;
80 int bitstreamBuffersUsed;
81 VdpBitstreamBuffer *bitstreamBuffers;
82 };
83
84 /* @}*/
85
86 #endif /* AVCODEC_VDPAU_RENDER_H */