Commit 8d34a2f8 authored by Philip Langdale's avatar Philip Langdale Committed by Luca Barbato

vdpau: Support for VDPAU accelerated HEVC decoding

Signed-off-by: 's avatarRémi Denis-Courmont <remi@remlab.net>
Signed-off-by: 's avatarLuca Barbato <lu_zero@gentoo.org>
parent 8958c5c6
...@@ -2148,6 +2148,8 @@ hevc_d3d11va_hwaccel_select="hevc_decoder" ...@@ -2148,6 +2148,8 @@ hevc_d3d11va_hwaccel_select="hevc_decoder"
hevc_dxva2_hwaccel_deps="dxva2 DXVA_PicParams_HEVC" hevc_dxva2_hwaccel_deps="dxva2 DXVA_PicParams_HEVC"
hevc_dxva2_hwaccel_select="hevc_decoder" hevc_dxva2_hwaccel_select="hevc_decoder"
hevc_qsv_hwaccel_deps="libmfx" hevc_qsv_hwaccel_deps="libmfx"
hevc_vdpau_hwaccel_deps="vdpau VdpPictureInfoHEVC"
hevc_vdpau_hwaccep_select="hevc_decoder"
mpeg1_vdpau_hwaccel_deps="vdpau" mpeg1_vdpau_hwaccel_deps="vdpau"
mpeg1_vdpau_hwaccel_select="mpeg1video_decoder" mpeg1_vdpau_hwaccel_select="mpeg1video_decoder"
mpeg2_d3d11va_hwaccel_deps="d3d11va" mpeg2_d3d11va_hwaccel_deps="d3d11va"
...@@ -4469,6 +4471,8 @@ check_type "windows.h dxva.h" "DXVA_PicParams_HEVC" -DWINAPI_FAMILY=WINAPI_FAMIL ...@@ -4469,6 +4471,8 @@ check_type "windows.h dxva.h" "DXVA_PicParams_HEVC" -DWINAPI_FAMILY=WINAPI_FAMIL
check_type "windows.h d3d11.h" "ID3D11VideoDecoder" check_type "windows.h d3d11.h" "ID3D11VideoDecoder"
check_type "d3d9.h dxva2api.h" DXVA2_ConfigPictureDecode -D_WIN32_WINNT=0x0602 check_type "d3d9.h dxva2api.h" DXVA2_ConfigPictureDecode -D_WIN32_WINNT=0x0602
check_type "vdpau/vdpau.h" "VdpPictureInfoHEVC"
if ! disabled w32threads && ! enabled pthreads; then if ! disabled w32threads && ! enabled pthreads; then
check_func_headers "windows.h process.h" _beginthreadex && check_func_headers "windows.h process.h" _beginthreadex &&
enable w32threads || disable w32threads enable w32threads || disable w32threads
......
...@@ -604,6 +604,7 @@ OBJS-$(CONFIG_H264_VDA_HWACCEL) += vda_h264.o ...@@ -604,6 +604,7 @@ OBJS-$(CONFIG_H264_VDA_HWACCEL) += vda_h264.o
OBJS-$(CONFIG_H264_VDPAU_HWACCEL) += vdpau_h264.o OBJS-$(CONFIG_H264_VDPAU_HWACCEL) += vdpau_h264.o
OBJS-$(CONFIG_HEVC_D3D11VA_HWACCEL) += dxva2_hevc.o OBJS-$(CONFIG_HEVC_D3D11VA_HWACCEL) += dxva2_hevc.o
OBJS-$(CONFIG_HEVC_DXVA2_HWACCEL) += dxva2_hevc.o OBJS-$(CONFIG_HEVC_DXVA2_HWACCEL) += dxva2_hevc.o
OBJS-$(CONFIG_HEVC_VDPAU_HWACCEL) += vdpau_hevc.o
OBJS-$(CONFIG_MPEG1_VDPAU_HWACCEL) += vdpau_mpeg12.o OBJS-$(CONFIG_MPEG1_VDPAU_HWACCEL) += vdpau_mpeg12.o
OBJS-$(CONFIG_MPEG2_D3D11VA_HWACCEL) += dxva2_mpeg2.o OBJS-$(CONFIG_MPEG2_D3D11VA_HWACCEL) += dxva2_mpeg2.o
OBJS-$(CONFIG_MPEG2_DXVA2_HWACCEL) += dxva2_mpeg2.o OBJS-$(CONFIG_MPEG2_DXVA2_HWACCEL) += dxva2_mpeg2.o
......
...@@ -86,6 +86,7 @@ void avcodec_register_all(void) ...@@ -86,6 +86,7 @@ void avcodec_register_all(void)
REGISTER_HWACCEL(HEVC_D3D11VA, hevc_d3d11va); REGISTER_HWACCEL(HEVC_D3D11VA, hevc_d3d11va);
REGISTER_HWACCEL(HEVC_DXVA2, hevc_dxva2); REGISTER_HWACCEL(HEVC_DXVA2, hevc_dxva2);
REGISTER_HWACCEL(HEVC_QSV, hevc_qsv); REGISTER_HWACCEL(HEVC_QSV, hevc_qsv);
REGISTER_HWACCEL(HEVC_VDPAU, hevc_vdpau);
REGISTER_HWACCEL(MPEG1_VDPAU, mpeg1_vdpau); REGISTER_HWACCEL(MPEG1_VDPAU, mpeg1_vdpau);
REGISTER_HWACCEL(MPEG2_D3D11VA, mpeg2_d3d11va); REGISTER_HWACCEL(MPEG2_D3D11VA, mpeg2_d3d11va);
REGISTER_HWACCEL(MPEG2_DXVA2, mpeg2_dxva2); REGISTER_HWACCEL(MPEG2_DXVA2, mpeg2_dxva2);
......
...@@ -380,7 +380,7 @@ static void export_stream_params(AVCodecContext *avctx, const HEVCParamSets *ps, ...@@ -380,7 +380,7 @@ static void export_stream_params(AVCodecContext *avctx, const HEVCParamSets *ps,
static int set_sps(HEVCContext *s, const HEVCSPS *sps) static int set_sps(HEVCContext *s, const HEVCSPS *sps)
{ {
#define HWACCEL_MAX (CONFIG_HEVC_DXVA2_HWACCEL + CONFIG_HEVC_D3D11VA_HWACCEL) #define HWACCEL_MAX (CONFIG_HEVC_DXVA2_HWACCEL + CONFIG_HEVC_D3D11VA_HWACCEL + CONFIG_HEVC_VDPAU_HWACCEL)
enum AVPixelFormat pix_fmts[HWACCEL_MAX + 2], *fmt = pix_fmts; enum AVPixelFormat pix_fmts[HWACCEL_MAX + 2], *fmt = pix_fmts;
int ret; int ret;
...@@ -403,6 +403,9 @@ static int set_sps(HEVCContext *s, const HEVCSPS *sps) ...@@ -403,6 +403,9 @@ static int set_sps(HEVCContext *s, const HEVCSPS *sps)
#endif #endif
#if CONFIG_HEVC_D3D11VA_HWACCEL #if CONFIG_HEVC_D3D11VA_HWACCEL
*fmt++ = AV_PIX_FMT_D3D11VA_VLD; *fmt++ = AV_PIX_FMT_D3D11VA_VLD;
#endif
#if CONFIG_HEVC_VDPAU_HWACCEL
*fmt++ = AV_PIX_FMT_VDPAU;
#endif #endif
} }
......
This diff is collapsed.
...@@ -46,6 +46,9 @@ union VDPAUPictureInfo { ...@@ -46,6 +46,9 @@ union VDPAUPictureInfo {
#ifdef VDP_DECODER_PROFILE_H264_HIGH_444_PREDICTIVE #ifdef VDP_DECODER_PROFILE_H264_HIGH_444_PREDICTIVE
VdpPictureInfoH264Predictive h264_predictive; VdpPictureInfoH264Predictive h264_predictive;
#endif #endif
#ifdef VDP_DECODER_PROFILE_HEVC_MAIN
VdpPictureInfoHEVC hevc;
#endif
}; };
typedef struct VDPAUHWContext { typedef struct VDPAUHWContext {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment