From db6a4eec0a9a58a342147e526154c46f19e7c303 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 5 Nov 2013 22:06:48 +0100 Subject: vo_opengl: support for vdpau hardware decoding This uses vdpau OpenGL interop to convert a vdpau surface to a texture. Note that this is a bit weak and primitive. Deinterlacing (or any other form of vdpau postprocessing) is not supported. vo_opengl chroma scaling and chroma sample position are not supported. Internally, the vdpau video surfaces are converted to a RGBA surface first, because using the video surfaces directly is too complicated. (These surfaces are always split into separate fields, and the vo_opengl core expects progressive frames or frames with weaved fields.) --- video/out/gl_common.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'video/out/gl_common.h') diff --git a/video/out/gl_common.h b/video/out/gl_common.h index 995dc441e7..8d7d5a8252 100644 --- a/video/out/gl_common.h +++ b/video/out/gl_common.h @@ -87,6 +87,7 @@ enum { MPGL_CAP_SRGB_FB = (1 << 8), MPGL_CAP_FLOAT_TEX = (1 << 9), MPGL_CAP_TEX_RG = (1 << 10), // GL_ARB_texture_rg / GL 3.x + MPGL_CAP_VDPAU = (1 << 11), // GL_NV_vdpau_interop MPGL_CAP_NO_SW = (1 << 30), // used to block sw. renderers }; @@ -355,6 +356,15 @@ struct GL { const GLfloat *); void (GLAPIENTRY *UniformMatrix4x3fv)(GLint, GLsizei, GLboolean, const GLfloat *); + + void (GLAPIENTRY *VDPAUInitNV)(const GLvoid *, const GLvoid *); + void (GLAPIENTRY *VDPAUFiniNV)(void); + GLvdpauSurfaceNV (GLAPIENTRY *VDPAURegisterOutputSurfaceNV) + (GLvoid *, GLenum, GLsizei, const GLuint *); + void (GLAPIENTRY *VDPAUUnregisterSurfaceNV)(GLvdpauSurfaceNV); + void (GLAPIENTRY *VDPAUSurfaceAccessNV)(GLvdpauSurfaceNV, GLenum); + void (GLAPIENTRY *VDPAUMapSurfacesNV)(GLsizei, const GLvdpauSurfaceNV *); + void (GLAPIENTRY *VDPAUUnmapSurfacesNV)(GLsizei, const GLvdpauSurfaceNV *); }; #endif /* MPLAYER_GL_COMMON_H */ -- cgit v1.2.3