mpv/video/out/gpu
wm4 9f595f3a80 vo_gpu: make screenshots use the GL renderer
Using the GL renderer for color conversion will make sure screenshots
will use the same conversion as normal video rendering. It can do this
for all types of screenshots.

The logic when to write 16 bit PNGs changes. To approximate the old
behavior, we decide by looking whether the source video format has more
than 8 bits per component. We apply this logic even for window
screenshots. Also, 16 bit PNGs now always include an unused alpha
channel. The reason is that FFmpeg has RGB48 and RGBA64 formats, but no
RGB064. RGB48 is 3 bytes and usually not supported by GPUs for
rendering, so we have to use RGBA64, which forces an alpha channel.

Will break for users who use --target-trc and similar options.

I considered creating a new gl_video context, but it could double GPU
memory use, so I didn't.

This uses FBOs instead of glGetTexImage(), because that increases the
chance it could work on GLES (e.g. ANGLE). Untested. No support for the
Vulkan and D3D11 backends yet.

Fixes #5498. Also fixes #5240, because the code for reading back is not
used with the new code path.
2018-02-11 17:45:51 -08:00
..
context.c
context.h
d3d11_helpers.c vo_gpu: d3d11: don't use a bgra8 swapchain 2018-01-04 22:08:10 +11:00
d3d11_helpers.h
hwdec.c hwdec: detach d3d and d3d9 hwaccel from angle 2018-01-25 20:57:45 -08:00
hwdec.h
lcms.c Fix various typos in log messages 2017-12-03 21:24:18 +01:00
lcms.h
osd.c vo_gpu: invalidate fbotex before drawing 2017-12-25 00:47:53 +01:00
osd.h
ra.c
ra.h vo_gpu: make screenshots use the GL renderer 2018-02-11 17:45:51 -08:00
shader_cache.c vo_gpu: vulkan: omit needless #define 2017-12-25 00:47:53 +01:00
shader_cache.h vo_gpu: invalidate fbotex before drawing 2017-12-25 00:47:53 +01:00
spirv.c
spirv.h
spirv_shaderc.c
user_shaders.c
user_shaders.h
utils.c msg: reinterpret a bunch of message levels 2017-12-15 22:28:47 -08:00
utils.h
video.c vo_gpu: make screenshots use the GL renderer 2018-02-11 17:45:51 -08:00
video.h vo_gpu: make screenshots use the GL renderer 2018-02-11 17:45:51 -08:00
video_shaders.c vo_gpu: add memory barrier on the HDR peak detection 2018-02-11 16:45:20 -08:00
video_shaders.h