aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil
diff options
context:
space:
mode:
authorLaurent Aimar <fenrir@videolan.org>2010-01-20 18:54:51 +0000
committerLaurent Aimar <fenrir@videolan.org>2010-01-20 18:54:51 +0000
commit92c6a099bafd10e5f2fc8a157f033692f930f998 (patch)
treebedccf77965006135305196183bc9e36bfbe0748 /libavutil
parent3d7b42f97b40b398819cbc03944cf4dab16dafad (diff)
downloadffmpeg-92c6a099bafd10e5f2fc8a157f033692f930f998.tar.gz
H264 DXVA2 implementation
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
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/pixdesc.c6
-rw-r--r--libavutil/pixfmt.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c
index b689519fde..972da4578f 100644
--- a/libavutil/pixdesc.c
+++ b/libavutil/pixdesc.c
@@ -646,6 +646,12 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = {
},
.flags = PIX_FMT_BE,
},
+ [PIX_FMT_DXVA2_VLD] = {
+ .name = "dxva2_vld",
+ .log2_chroma_w = 1,
+ .log2_chroma_h = 1,
+ .flags = PIX_FMT_HWACCEL,
+ },
};
int av_get_bits_per_pixel(const AVPixFmtDescriptor *pixdesc)
diff --git a/libavutil/pixfmt.h b/libavutil/pixfmt.h
index a18da18af4..6eddde02bb 100644
--- a/libavutil/pixfmt.h
+++ b/libavutil/pixfmt.h
@@ -126,6 +126,7 @@ enum PixelFormat {
PIX_FMT_YUV444P16LE, ///< planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
PIX_FMT_YUV444P16BE, ///< planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
PIX_FMT_VDPAU_MPEG4, ///< MPEG4 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers
+ PIX_FMT_DXVA2_VLD, ///< HW decoding through DXVA2, Picture.data[3] contains a LPDIRECT3DSURFACE9 pointer
PIX_FMT_NB, ///< number of pixel formats, DO NOT USE THIS if you want to link with shared libav* because the number of formats might differ between versions
};