mirror of
https://git.videolan.org/git/ffmpeg.git
synced 2024-08-18 07:15:04 +02:00
![Laurent Aimar](/assets/img/avatar_default.png)
It allows VLD H264 decoding using DXVA2 (GPU assisted decoding API under VISTA and Windows 7). It is implemented by using AVHWAccel API. It has been tested successfully for some time in VLC using an nvidia card on Windows 7. To compile it, you need to have the system header dxva2api.h (either from microsoft or using http://downloads.videolan.org/pub/videolan/testing/contrib/dxva2api.h) The generated libavcodec.dll does not depend directly on any new lib as the necessary objects are given by the application using FFmpeg. Originally committed as revision 21353 to svn://svn.ffmpeg.org/ffmpeg/trunk
69 lines
1.8 KiB
C
69 lines
1.8 KiB
C
/*
|
|
* DXVA2 HW acceleration
|
|
*
|
|
* copyright (c) 2009 Laurent Aimar
|
|
*
|
|
* This file is part of FFmpeg.
|
|
*
|
|
* FFmpeg is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
*
|
|
* FFmpeg is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
* License along with FFmpeg; if not, write to the Free Software
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
*/
|
|
|
|
#ifndef AVCODEC_DXVA_H
|
|
#define AVCODEC_DXVA_H
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <dxva2api.h>
|
|
|
|
/**
|
|
* This structure is used to provides the necessary configurations and data
|
|
* to the DXVA2 FFmpeg HWAccel implementation.
|
|
*
|
|
* The application must make it available as AVCodecContext.hwaccel_context.
|
|
*/
|
|
struct dxva_context {
|
|
/**
|
|
* DXVA2 decoder object
|
|
*/
|
|
IDirectXVideoDecoder *decoder;
|
|
|
|
/**
|
|
* DXVA2 configuration used to create the decoder
|
|
*/
|
|
const DXVA2_ConfigPictureDecode *cfg;
|
|
|
|
/**
|
|
* The number of surface in the surface array
|
|
*/
|
|
unsigned surface_count;
|
|
|
|
/**
|
|
* The array of Direct3D surfaces used to create the decoder
|
|
*/
|
|
LPDIRECT3DSURFACE9 *surface;
|
|
|
|
/**
|
|
* A bit field configuring the workarounds needed for using the decoder
|
|
*/
|
|
uint64_t workaround;
|
|
|
|
/**
|
|
* Private to the FFmpeg AVHWAccel implementation
|
|
*/
|
|
unsigned report_id;
|
|
};
|
|
|
|
#endif /* AVCODEC_DXVA_H */
|