mirror of https://github.com/mpv-player/mpv
d855be5ec1
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. |
||
---|---|---|
.. | ||
pullup.c | ||
pullup.h | ||
vf.c | ||
vf.h | ||
vf_buffer.c | ||
vf_crop.c | ||
vf_delogo.c | ||
vf_divtc.c | ||
vf_dlopen.c | ||
vf_dlopen.h | ||
vf_dsize.c | ||
vf_eq.c | ||
vf_expand.c | ||
vf_flip.c | ||
vf_format.c | ||
vf_gradfun.c | ||
vf_hqdn3d.c | ||
vf_ilpack.c | ||
vf_lavfi.c | ||
vf_lavfi.h | ||
vf_mirror.c | ||
vf_noformat.c | ||
vf_noise.c | ||
vf_phase.c | ||
vf_pp.c | ||
vf_pullup.c | ||
vf_rotate.c | ||
vf_scale.c | ||
vf_screenshot.c | ||
vf_softpulldown.c | ||
vf_stereo3d.c | ||
vf_sub.c | ||
vf_swapuv.c | ||
vf_unsharp.c | ||
vf_vapoursynth.c | ||
vf_vavpp.c | ||
vf_vdpaupp.c | ||
vf_yadif.c |