mpv/video/out
wm4 f5ff2656e0 vaapi: determine surface format in decoder, not in renderer
Until now, we have made the assumption that a driver will use only 1
hardware surface format. the format is dictated by the driver (you
don't create surfaces with a specific format - you just pass a
rt_format and get a surface that will be in a specific driver-chosen
format).

In particular, the renderer created a dummy surface to probe the format,
and hoped the decoder would produce the same format. Due to a driver
bug this required a workaround to actually get the same format as the
driver did.

Change this so that the format is determined in the decoder. The format
is then passed down as hw_subfmt, which allows the renderer to configure
itself with the correct format. If the hardware surface changes its
format midstream, the renderer can be reconfigured using the normal
mechanisms.

This calls va_surface_init_subformat() each time after the decoder
returns a surface. Since libavcodec/AVFrame has no concept of sub-
formats, this is unavoidable. It creates and destroys a derived
VAImage, but this shouldn't have any bad performance effects (at
least I didn't notice any measurable effects).

Note that vaDeriveImage() failures are silently ignored as some
drivers (the vdpau wrapper) support neither vaDeriveImage, nor EGL
interop. In addition, we still probe whether we can map an image
in the EGL interop code. This is important as it's the only way
to determine whether EGL interop is supported at all. With respect
to the driver bug mentioned above, it doesn't matter which format
the test surface has.

In vf_vavpp, also remove the rt_format guessing business. I think the
existing logic was a bit meaningless anyway. It's not even a given
that vavpp produces the same rt_format for output.
2016-04-11 22:03:26 +02:00
..
cocoa
opengl vaapi: determine surface format in decoder, not in renderer 2016-04-11 22:03:26 +02:00
wayland Relicense some non-MPlayer source files to LGPL 2.1 or later 2016-01-19 18:36:06 +01:00
win32 mpv_talloc.h: rename from talloc.h 2016-01-11 21:05:55 +01:00
aspect.c aspect: rework --video-unscaled 2016-04-10 18:29:20 +02:00
aspect.h
bitmap_packer.c Relicense some non-MPlayer source files to LGPL 2.1 or later 2016-01-19 18:36:06 +01:00
bitmap_packer.h
cocoa_common.h
cocoa_common.m cocoa: get fps only from dislaylink 2016-01-14 11:11:43 +01:00
d3d_shader_420p.h
d3d_shader_nv12.h
d3d_shader_yuv.hlsl
dither.c Change GPL/LGPL dual-licensed files to LGPL 2016-01-19 18:36:34 +01:00
dither.h
drm_common.c Change GPL/LGPL dual-licensed files to LGPL 2016-01-19 18:36:34 +01:00
drm_common.h Relicense some non-MPlayer source files to LGPL 2.1 or later 2016-01-19 18:36:06 +01:00
filter_kernels.c
filter_kernels.h filter_kernels.h: adjust the license 2016-01-19 18:41:11 +01:00
vo.c vo: don't reset vsync statistics on seeks etc. 2016-04-06 22:56:12 +02:00
vo.h
vo_caca.c
vo_direct3d.c video: remove some useless old RGB formats 2016-01-25 10:43:35 +01:00
vo_drm.c Change GPL/LGPL dual-licensed files to LGPL 2016-01-19 18:36:34 +01:00
vo_image.c mpv_talloc.h: rename from talloc.h 2016-01-11 21:05:55 +01:00
vo_lavc.c encode_lavc: Migrate to codecpar API. 2016-04-11 14:57:20 -04:00
vo_null.c
vo_opengl.c vo_opengl: generate 3DLUT against source and use full BT.1886 2016-04-01 10:27:27 +02:00
vo_opengl_cb.c vo_opengl: generate 3DLUT against source and use full BT.1886 2016-04-01 10:27:27 +02:00
vo_rpi.c vo_opengl, vo_rpi: unbreak a few things 2016-02-24 10:23:50 +01:00
vo_sdl.c video: remove some useless old RGB formats 2016-01-25 10:43:35 +01:00
vo_vaapi.c
vo_vdpau.c mpv_talloc.h: rename from talloc.h 2016-01-11 21:05:55 +01:00
vo_wayland.c video: remove some useless old RGB formats 2016-01-25 10:43:35 +01:00
vo_x11.c vo_xv, vo_x11: warn that these VOs should not be used 2016-03-06 19:22:15 +01:00
vo_xv.c vo_xv, vo_x11: warn that these VOs should not be used 2016-03-06 19:22:15 +01:00
w32_common.c w32_common: switch to UniformResourceLocatorW 2016-02-02 21:51:50 +01:00
w32_common.h
wayland_common.c Revert "wayland: set fs mode on every configure" 2016-03-19 14:09:13 +01:00
wayland_common.h Relicense some non-MPlayer source files to LGPL 2.1 or later 2016-01-19 18:36:06 +01:00
win_state.c
win_state.h
x11_common.c x11, input: move mime type drag&drop negotiation to common code 2016-03-15 22:42:06 +01:00
x11_common.h x11: move vo->input_ctx accesses to x11->input_ctx 2016-03-15 22:11:31 +01:00
x11_icon.bin