From 0d19316de2c743388e8b2fae7e238f7d4db1ab1f Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 17 Mar 2016 14:58:49 +0100 Subject: vo_opengl: dxva2egl: ignore alpha component in the mapped video converted_imgfmt will be used by the renderer logic to build an appropriate shader chain. It doesn't influence the format of any textures. Thus it doesn't matter whether the hw video surface is mapped as RGB or RGBA. What matters is if the video actually contains alpha or not. Since virtually all hardware decoder do not support alpha in any way, this can be hardcoded as "no alpha". This avoids unnecessary GPU work. --- video/out/opengl/hwdec_dxva2egl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/video/out/opengl/hwdec_dxva2egl.c b/video/out/opengl/hwdec_dxva2egl.c index f2c15145ef..eed942618c 100644 --- a/video/out/opengl/hwdec_dxva2egl.c +++ b/video/out/opengl/hwdec_dxva2egl.c @@ -202,9 +202,7 @@ static int create(struct gl_hwdec *hw) goto fail; } - hw->converted_imgfmt = p->alpha ? IMGFMT_RGBA : IMGFMT_RGB0; - MP_VERBOSE(hw, "Using image format %s\n", - mp_imgfmt_to_name(hw->converted_imgfmt)); + hw->converted_imgfmt = IMGFMT_RGB0; p->ctx.d3d9_device = (IDirect3DDevice9 *)p->device9ex; p->ctx.hwctx.type = HWDEC_DXVA2; -- cgit v1.2.3