1
0
mirror of https://github.com/mpv-player/mpv synced 2025-01-10 08:59:45 +00:00
mpv/video/out
Niklas Haas 93546f0c2f vo_opengl: refactor pass_read_video and texture binding
This is a pretty major rewrite of the internal texture binding
mechanic, which makes it more flexible.

In general, the difference between the old and current approaches is
that now, all texture description is held in a struct img_tex and only
explicitly bound with pass_bind. (Once bound, a texture unit is assumed
to be set in stone and no longer tied to the img_tex)

This approach makes the code inside pass_read_video significantly more
flexible and cuts down on the number of weird special cases and
spaghetti logic.

It also has some improvements, e.g. cutting down greatly on the number
of unnecessary conversion passes inside pass_read_video (which was
previously mostly done to cope with the fact that the alternative would
have resulted in a combinatorial explosion of code complexity).

Some other notable changes (and potential improvements):

- texture expansion is now *always* handled in pass_read_video, and the
  colormatrix never does this anymore. (Which means the code could
  probably be removed from the colormatrix generation logic, modulo some
  other VOs)

- struct fbo_tex now stores both its "physical" and "logical"
  (configured) size, which cuts down on the amount of width/height
  baggage on some function calls

- vo_opengl can now technically support textures with different bit
  depths (e.g. 10 bit luma, 8 bit chroma) - but the APIs it queries
  inside img_format.c doesn't export this (nor does ffmpeg support it,
  really) so the status quo of using the same tex_mul for all planes is
  kept.

- dumb_mode is now only needed because of the indirect_fbo being in the
  main rendering pipeline. If we reintroduce p->use_indirect and thread
  a transform through the entire program this could be skipped where
  unnecessary, allowing for the removal of dumb_mode. But I'm not sure
  how to do this in a clean way. (Which is part of why it got introduced
  to begin with)

- It would be trivial to resurrect source-shader now (it would just be
  one extra 'if' inside pass_read_video).
2016-03-05 13:08:38 +01:00
..
cocoa
opengl vo_opengl: refactor pass_read_video and texture binding 2016-03-05 13:08:38 +01: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 video: switch from using display aspect to sample aspect 2015-12-19 20:45:36 +01: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: improve the gaussian function 2016-01-07 12:17:34 +01:00
filter_kernels.h filter_kernels.h: adjust the license 2016-01-19 18:41:11 +01:00
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 mpv_talloc.h: rename from talloc.h 2016-01-11 21:05:55 +01:00
vo_null.c
vo_opengl_cb.c vo_opengl_cb: unbreak destroying+recreating GL context 2016-02-15 14:50:03 +01:00
vo_opengl.c Change GPL/LGPL dual-licensed files to LGPL 2016-01-19 18:36:34 +01: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 vaapi: replace VA_STR_FOURCC 2016-01-11 20:30:36 +01:00
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_x11: add 16bpp support 2016-02-22 22:13:28 +01:00
vo_xv.c mpv_talloc.h: rename from talloc.h 2016-01-11 21:05:55 +01:00
vo.c mpv_talloc.h: rename from talloc.h 2016-01-11 21:05:55 +01:00
vo.h vo: get rid of vo_get_window_title() 2015-12-06 18:41:31 +01:00
w32_common.c w32_common: switch to UniformResourceLocatorW 2016-02-02 21:51:50 +01:00
w32_common.h
wayland_common.c wayland: set fs mode on every configure 2016-02-07 15:44:54 +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 video: switch from using display aspect to sample aspect 2015-12-19 20:45:36 +01:00
win_state.h
x11_common.c x11: stop waiting for MapNotify when WM_STATE changes 2016-01-31 00:10:20 +01:00
x11_common.h vo: get rid of vo_get_window_title() 2015-12-06 18:41:31 +01:00
x11_icon.bin