mpv/video
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
..
decode win32: request UTF-16 API variants, Vista+ APIs, and COM C macros 2015-01-07 21:42:44 +01:00
filter vf_scale: replace ancient fallback image format selection 2015-01-21 18:33:47 +01:00
out vo_opengl_old: remove this VO 2015-01-20 21:15:04 +01:00
csputils.c video: Remove some stale CMS code, minor cosmetics 2015-01-07 14:22:17 +01:00
csputils.h vo_opengl: get rid of approx-gamma and make it the default as per BT.1886 2015-01-16 02:17:19 +01:00
fmt-conversion.c video: remove swapped-endian image format aliases 2014-11-05 01:52:20 +01:00
fmt-conversion.h
hwdec.h
image_writer.c image_writer: check for conversion errors 2015-01-15 20:10:08 +01:00
image_writer.h
img_format.c vf_scale: replace ancient fallback image format selection 2015-01-21 18:33:47 +01:00
img_format.h vf_scale: replace ancient fallback image format selection 2015-01-21 18:33:47 +01:00
img_fourcc.h
memcpy_pic.h
mp_image.c mp_image: reject invalid display aspect ratio 2015-01-13 14:26:25 +01:00
mp_image.h video: remove things forgotten in previous commit 2014-12-03 23:12:22 +01:00
mp_image_pool.c
mp_image_pool.h
sws_utils.c image_writer: check for conversion errors 2015-01-15 20:10:08 +01:00
sws_utils.h image_writer: check for conversion errors 2015-01-15 20:10:08 +01:00
vaapi.c
vaapi.h
vdpau.c vdpau/GLX: don't access VO backend 2014-12-03 21:13:59 +01:00
vdpau.h vdpau/GLX: don't access VO backend 2014-12-03 21:13:59 +01:00
vdpau_functions.inc
vdpau_mixer.c csputils: replace float[3][4] with a struct 2015-01-06 16:51:06 +01:00
vdpau_mixer.h
vfcap.h