mirror of https://github.com/mpv-player/mpv
b135af6842
It seems this will be useful for Rokchip DRM hwcontext integration. DRM hwcontexts have additional internal structure which can be different depending on the decoder, and which is not part of the generic hwcontext API. Rockchip has 1 layer, which EGL interop happens to translate to a RGB texture, while VAAPI (mapped as DRM hwcontext) will use multiple layers. Both will use sw_format=nv12, and thus are indistinguishable on the mp_image_params level. But this is needed to initialize the EGL mapping and the vo_gpu video renderer correctly. We hope that the layer count is enough to tell whether EGL will translate the data to a RGB texture (vs. 2 texture resembling raw nv12 data). For that we introduce MP_IMAGE_HW_FLAG_OPAQUE. This commit adds the flag, infrastructure to set it, and an "example" for D3D11. The D3D11 addition is quite useless at this point. But later we want to get rid of d3d11_update_image_attribs() anyway, while we still need a way to force d3d11vpp filter insertion, so maybe it has some justification (who knows). In any case it makes testing this easier. Obviously it also adds some basic support for triggering the opaque format for decoding, which will use a driver-specific format, but which is not supported in shaders. The opaque flag is not used to determine whether d3d11vpp needs to be inserted, though. |
||
---|---|---|
.. | ||
refqueue.c | ||
refqueue.h | ||
vf.c | ||
vf.h | ||
vf_buffer.c | ||
vf_crop.c | ||
vf_d3d11vpp.c | ||
vf_dsize.c | ||
vf_expand.c | ||
vf_flip.c | ||
vf_format.c | ||
vf_gradfun.c | ||
vf_lavfi.c | ||
vf_lavfi.h | ||
vf_mirror.c | ||
vf_noformat.c | ||
vf_pullup.c | ||
vf_rotate.c | ||
vf_scale.c | ||
vf_stereo3d.c | ||
vf_sub.c | ||
vf_vapoursynth.c | ||
vf_vavpp.c | ||
vf_vdpaupp.c | ||
vf_yadif.c |