0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00
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 Take care of some libavutil deprecations, drop support for FFmpeg 1.0 2013-11-29 17:39:57 +01:00
hwdec.h video: move display and timing to a separate thread 2014-08-12 23:24:08 +02:00
image_writer.c image_writer: check for conversion errors 2015-01-15 20:10:08 +01:00
image_writer.h image_writer: mp_msg conversions 2013-12-21 20:50:10 +01:00
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 build: deal with endian mess 2014-07-10 00:58:56 +02:00
memcpy_pic.h memcpy_pic: reformat 2013-11-06 20:27:13 +01:00
mp_image_pool.c video: introduce failure path for image allocations 2014-06-17 22:43:43 +02:00
mp_image_pool.h video: introduce failure path for image allocations 2014-06-17 22:43:43 +02:00
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
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: try dealing with Intel's braindamaged shit drivers 2014-08-21 22:45:58 +02:00
vaapi.h vaapi: try dealing with Intel's braindamaged shit drivers 2014-08-21 22:45:58 +02:00
vdpau_functions.inc video: warn if an emulated hwdec API is used 2014-05-28 02:08:45 +02:00
vdpau_mixer.c csputils: replace float[3][4] with a struct 2015-01-06 16:51:06 +01:00
vdpau_mixer.h vdpau_mixer: allow overriding frame opts 2014-05-02 01:08:04 +02:00
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
vfcap.h video: remove --flip 2013-12-05 22:58:54 +01:00