mpv/video/filter
wm4 30ca30c0a1 vf_scale: replace ancient fallback image format selection
If video output and VO don't support the same format, a conversion
filter needs to be insert. Since a VO can support multiple formats, and
the filter chain also can deal with multiple formats, you basically have
to pick from a huge matrix of possible conversions.

The old MPlayer code had a quite naive algorithm: it first checked
whether any conversion from the list of preferred conversions matched,
and if not, it was falling back on checking a hardcoded list of output
formats (more or less sorted by quality). This had some unintended side-
effects, like not using obvious "replacement" formats, selecting the
wrong colorspace, selecting a bit depth that is too high or too low, and
more.

Use avcodec_find_best_pix_fmt_of_list() provided by FFmpeg instead. This
function was made for this purpose, and should select the "best" format.

Libav provides a similar function, but with a different name - there is
a function with the same name in FFmpeg, but it has different semantics
(I'm not sure if Libav or FFmpeg fucked up here).

This also removes handling of VFCAP_CSP_SUPPORTED vs.
VFCAP_CSP_SUPPORTED_BY_HW, which has no meaning anymore, except possibly
for filter chains with multiple scale filters.

Fixes #1494.
2015-01-21 18:33:47 +01:00
..
pullup.c
pullup.h
vf.c vf: make message less confusing 2015-01-13 14:40:37 +01:00
vf.h vf_vapoursynth: pass through container FPS value 2015-01-03 03:37:05 +01:00
vf_buffer.c video/filter: add vf_buffer 2014-07-30 23:29:00 +02:00
vf_crop.c
vf_delogo.c
vf_divtc.c Remove mpbswap.h 2014-09-25 21:32:55 +02:00
vf_dlopen.c win32: request UTF-16 API variants, Vista+ APIs, and COM C macros 2015-01-07 21:42:44 +01:00
vf_dlopen.h
vf_dsize.c
vf_eq.c video: introduce failure path for image allocations 2014-06-17 22:43:43 +02:00
vf_expand.c video: introduce failure path for image allocations 2014-06-17 22:43:43 +02:00
vf_flip.c
vf_format.c
vf_gradfun.c vf_lavfi: make chaining from other filters more flexible 2014-09-27 17:21:29 +02:00
vf_hqdn3d.c
vf_ilpack.c video: introduce failure path for image allocations 2014-06-17 22:43:43 +02:00
vf_lavfi.c vf_lavfi: proper rounding for lavfi->mpv aspect ratio 2014-10-09 18:18:05 +02:00
vf_lavfi.h vf_lavfi: fix compilation failure 2014-10-08 12:44:47 +02:00
vf_mirror.c video: introduce failure path for image allocations 2014-06-17 22:43:43 +02:00
vf_noformat.c
vf_noise.c video: introduce failure path for image allocations 2014-06-17 22:43:43 +02:00
vf_phase.c video: introduce failure path for image allocations 2014-06-17 22:43:43 +02:00
vf_pullup.c video: remove internal QP passing 2014-12-03 23:01:20 +01:00
vf_rotate.c Silence some Coverity warnings 2014-11-21 09:59:58 +01:00
vf_scale.c vf_scale: replace ancient fallback image format selection 2015-01-21 18:33:47 +01:00
vf_screenshot.c
vf_softpulldown.c vf_softpulldown: handle null mpi_image correctly 2014-08-30 15:15:38 +02:00
vf_stereo3d.c vf_stereo3d: fix "auto" input format with libav 2014-10-04 16:28:30 +02:00
vf_sub.c vf_sub: fix previous commit 2014-11-11 19:26:43 +01:00
vf_swapuv.c
vf_unsharp.c
vf_vapoursynth.c vf_vapoursynth: autodetect CPU count 2015-01-05 12:49:13 +01:00
vf_vavpp.c
vf_vdpaupp.c video: introduce failure path for image allocations 2014-06-17 22:43:43 +02:00
vf_yadif.c