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.
This commit is contained in:
wm4 2016-03-17 14:58:49 +01:00
parent 45db7d52a9
commit 0d19316de2
1 changed files with 1 additions and 3 deletions

View File

@ -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;