1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-24 17:06:58 +00:00
mpv/libmpcodecs
wm4 75eab4f72a video, options: implement better YUV->RGB conversion control
Rewrite control of the colorspace and input/output level parameters
used in YUV-RGB conversions, replacing VO-specific suboptions with new
common options and adding configuration support to more cases.

Add new option --colormatrix which selects the colorspace the original
video is assumed to have in YUV->RGB conversions. The default
behavior changes from assuming BT.601 to colorspace autoselection
between BT.601 and BT.709 using a simple heuristic based on video
size. Add new options --colormatrix-input-range and
--colormatrix-output-range which select input YUV and output RGB range.
Disable the previously existing VO-specific colorspace and level
conversion suboptions in vo_gl and vo_vdpau. Remove the
"yuv_colorspace" property and replace it with one named "colormatrix"
and semantics matching the new option. Add new properties matching the
options for level conversion.

Colorspace selection is currently supported by vo_gl, vo_vdpau, vo_xv
and vf_scale, and all can change it at runtime (previously only
vo_vdpau and vo_xv could). vo_vdpau now uses the same conversion
matrix generation as vo_gl instead of libvdpau functionality; the main
functional difference is that the "contrast" equalizer control behaves
somewhat differently (it scales the Y component around 1/2 instead of
around 0, so that contrast 0 makes the image gray rather than black).
vo_xv does not support level conversion. vf_scale supports range
setting for input, but always outputs full-range RGB.

The value of the slave properties is the policy setting used for
conversions. This means they can be set to any value regardless of
whether the current VO supports that value or whether there currently
even is any video. Possibly separate properties could be added to
query the conversion actually used at the moment, if any.

Because the colorspace and level settings are now set with a single
VF/VO control call, the return value of that is no longer used to
signal whether all the settings are actually supported. Instead code
should set all the details it can support, and ignore the rest. The
core will use GET_YUV_COLORSPACE to check which colorspace details
have been set and which not. In other words, the return value for
SET_YUV_COLORSPACE only signals whether any kind of YUV colorspace
conversion handling exists at all, and VOs have to take care to return
the actual state with GET_YUV_COLORSPACE instead.

To be changed in later commits: add missing option documentation.
2011-10-16 21:11:11 +03:00
..
native Remove MEncoder 2010-11-02 04:16:55 +02:00
ad_acm.c cleanup: malloc+memset->calloc, sizeof(TYPE)->sizeof(*ptr) 2010-11-02 04:16:46 +02:00
ad_alaw.c Merge svn changes up to r30463 2010-03-09 18:59:15 +02:00
ad_dk3adpcm.c Use AV_RL* macros instead of typecasts where appropriate 2010-11-02 04:14:43 +02:00
ad_dmo.c options: move audio_output_channels, audio_output_format to struct 2010-11-02 04:18:07 +02:00
ad_dshow.c Delete things related to old translation system 2010-03-10 03:47:14 +02:00
ad_dvdpcm.c Delete things related to old translation system 2010-03-10 03:47:14 +02:00
ad_faad.c libfaad2:/ Remove forked internal libfaad2 copy 2011-01-31 16:00:58 +02:00
ad_ffmpeg.c ad_ffmpeg: free resources on init failure 2011-08-21 23:04:20 +03:00
ad_hwac3.c cleanup: shut up more warnings 2011-05-06 18:33:16 +03:00
ad_hwmpa.c Delete things related to old translation system 2010-03-10 03:47:14 +02:00
ad_imaadpcm.c Use AV_RL* macros instead of typecasts where appropriate 2010-11-02 04:14:43 +02:00
ad_internal.h options: move audio_output_channels, audio_output_format to struct 2010-11-02 04:18:07 +02:00
ad_liba52.c ad_liba52: Fix -ac a52 with tags other than 0x2000 or dnet 2011-04-13 03:15:05 +03:00
ad_libdca.c ad_libdca: fix assert failure on -channels >6 2010-11-02 04:18:07 +02:00
ad_libdv.c Delete things related to old translation system 2010-03-10 03:47:14 +02:00
ad_libmad.c whitespace cosmetics 2010-05-25 11:39:58 +00:00
ad_libvorbis.c Merge svn changes up to r30463 2010-03-09 18:59:15 +02:00
ad_mpc.c cleanup: remove NULL checks before free() all over the code 2010-11-14 13:11:20 +02:00
ad_mpg123.c ad_mpeg123: Enable robust resync 2010-11-02 04:14:44 +02:00
ad_msadpcm.c Merge svn changes up to r30463 2010-03-09 18:59:15 +02:00
ad_pcm.c audio: disallow partial samples, fix ad_pcm to comply 2011-05-07 22:17:51 +03:00
ad_qtaudio.c ad_qtaudio: don't run win32 loader code when it's not used 2011-05-02 00:36:20 +03:00
ad_realaud.c cleanup: shut up more warnings 2011-05-06 18:33:16 +03:00
ad_sample.c whitespace cosmetics 2010-05-25 11:39:58 +00:00
ad_speex.c ad_speex: support decoding stream without header packet 2011-05-02 00:36:21 +03:00
ad_twin.c Delete things related to old translation system 2010-03-10 03:47:14 +02:00
ad.c mp3lib: drop internal mp3lib tree 2011-04-02 07:28:53 +03:00
ad.h Forgotten part of previous commit (extern declaration of drc_level). 2010-05-30 16:48:18 +00:00
cmmx.h Add missing license headers to all files in the libmpcodecs directory. 2010-01-30 16:57:40 +00:00
dec_audio.c audio: move ready-for-ao data buffer from decoder to AO 2011-07-02 09:22:32 +03:00
dec_audio.h audio: move ready-for-ao data buffer from decoder to AO 2011-07-02 09:22:32 +03:00
dec_teletext.c cleanup: shut up more warnings 2011-05-06 18:33:16 +03:00
dec_teletext.h Add support for DVB teletext. 2009-11-10 11:31:47 +00:00
dec_video.c video, options: implement better YUV->RGB conversion control 2011-10-16 21:11:11 +03:00
dec_video.h video, options: implement better YUV->RGB conversion control 2011-10-16 21:11:11 +03:00
img_format.c vo_gl: don't accept 9/10-bit formats as input 2011-06-29 10:49:41 +03:00
img_format.h img_format.h, vo_gl: fix IMGFMT_IS_YUVP16() definition 2011-07-14 01:19:07 +03:00
mp_image.c vo_gl: don't accept 9/10-bit formats as input 2011-06-29 10:49:41 +03:00
mp_image.h cosmetics: Drop pointless _s suffix from 'struct mp_image'. 2010-05-27 10:08:30 +00:00
mpc_info.h Add missing license headers to all files in the libmpcodecs directory. 2010-01-30 16:57:40 +00:00
pullup.c vf_*: fix pts values passed to the next filter 2011-04-24 03:55:47 +03:00
pullup.h vf_*: fix pts values passed to the next filter 2011-04-24 03:55:47 +03:00
vd_dmo.c Merge svn changes up to r31050 2010-04-26 18:46:18 +03:00
vd_dshow.c Delete things related to old translation system 2010-03-10 03:47:14 +02:00
vd_ffmpeg.c core, demux, vd_ffmpeg: pass side data from demux_lavf to vd_ffmpeg 2011-08-20 20:25:43 +03:00
vd_hmblck.c Remove unnecessary size limits and a related define for hm12 decoder. 2010-03-19 19:44:02 +00:00
vd_ijpg.c Directly mark jpeg_buf_src() as void instead of using some indirection marcro. 2010-05-29 10:06:29 +00:00
vd_internal.h Merge svn changes up to r30463 2010-03-09 18:59:15 +02:00
vd_libdv.c Merge svn changes up to r30463 2010-03-09 18:59:15 +02:00
vd_libdv.h Add header for init_global_rawdv_decoder() instead of forward declaring it. 2010-02-16 14:52:59 +00:00
vd_lzo.c cosmetics: Remove vim/emacs coding style hints from sources 2010-11-02 04:16:48 +02:00
vd_mpegpes.c Merge svn changes up to r30463 2010-03-09 18:59:15 +02:00
vd_mpng.c vd_mpng: libpng API update, use color type getter 2011-02-15 19:14:34 +02:00
vd_mtga.c Use AV_RL* macros instead of typecasts where appropriate 2010-11-02 04:14:43 +02:00
vd_null.c Merge svn changes up to r30463 2010-03-09 18:59:15 +02:00
vd_qtvideo.c vd_qtvideo: Do not dump image description by default 2010-12-16 04:57:18 +02:00
vd_raw.c Fix crash with incomplete yuv2 frames. 2010-03-28 00:08:28 +00:00
vd_realvid.c cleanup: shut up more warnings 2011-05-06 18:33:16 +03:00
vd_sgi.c cleanup: shut up more warnings 2011-05-06 18:33:16 +03:00
vd_theora.c Merge svn changes up to r31256 2010-05-30 16:39:41 +03:00
vd_vfw.c Delete things related to old translation system 2010-03-10 03:47:14 +02:00
vd_vfwex.c
vd_xanim.c cleanup: fix mp_dbg() format string warnings 2011-07-01 03:37:34 +03:00
vd_xvid4.c cleanup: remove more warnings 2011-05-02 00:46:48 +03:00
vd.c video, options: implement better YUV->RGB conversion control 2011-10-16 21:11:11 +03:00
vd.h core, demux, vd_ffmpeg: pass side data from demux_lavf to vd_ffmpeg 2011-08-20 20:25:43 +03:00
vf_1bpp.c cosmetics: "struct vf_instance* vf" -> "struct vf_instance *vf" 2010-05-29 17:20:44 +03:00
vf_2xsai.c cosmetics: "struct vf_instance* vf" -> "struct vf_instance *vf" 2010-05-29 17:20:44 +03:00
vf_ass.c options: move libass-related options to struct 2011-09-03 14:26:14 +03:00
vf_blackframe.c cleanup: remove NULL checks before free() all over the code 2010-11-14 13:11:20 +02:00
vf_bmovl.c cleanup: remove more warnings 2011-05-02 00:46:48 +03:00
vf_boxblur.c cosmetics: "struct vf_instance* vf" -> "struct vf_instance *vf" 2010-05-29 17:20:44 +03:00
vf_crop.c cosmetics: "struct vf_instance* vf" -> "struct vf_instance *vf" 2010-05-29 17:20:44 +03:00
vf_cropdetect.c cosmetics: "struct vf_instance* vf" -> "struct vf_instance *vf" 2010-05-29 17:20:44 +03:00
vf_decimate.c cosmetics: "struct vf_instance* vf" -> "struct vf_instance *vf" 2010-05-29 17:20:44 +03:00
vf_delogo.c vf_delogo: allow to change the rectangle based on the time 2011-07-06 07:13:08 +03:00
vf_denoise3d.c cleanup: remove NULL checks before free() all over the code 2010-11-14 13:11:20 +02:00
vf_detc.c vf_*: fix pts values passed to the next filter 2011-04-24 03:55:47 +03:00
vf_dint.c vf_dint, vf_divtc: fix code assuming "char" is signed 2011-07-06 09:15:57 +03:00
vf_divtc.c vf_dint, vf_divtc: fix code assuming "char" is signed 2011-07-06 09:15:57 +03:00
vf_down3dright.c cosmetics: "struct vf_instance* vf" -> "struct vf_instance *vf" 2010-05-29 17:20:44 +03:00
vf_dsize.c cosmetics: "struct vf_instance* vf" -> "struct vf_instance *vf" 2010-05-29 17:20:44 +03:00
vf_dvbscale.c cosmetics: "struct vf_instance* vf" -> "struct vf_instance *vf" 2010-05-29 17:20:44 +03:00
vf_eq2.c Do not cast the results of malloc/calloc/realloc. 2010-02-26 15:01:37 +00:00
vf_eq.c cleanup: remove NULL checks before free() all over the code 2010-11-14 13:11:20 +02:00
vf_expand.c sub/OSD: move some related files to sub/ 2011-01-26 20:39:05 +02:00
vf_field.c cosmetics: "struct vf_instance* vf" -> "struct vf_instance *vf" 2010-05-29 17:20:44 +03:00
vf_fil.c cosmetics: "struct vf_instance* vf" -> "struct vf_instance *vf" 2010-05-29 17:20:44 +03:00
vf_filmdint.c cleanup: shut up more warnings 2011-05-06 18:33:16 +03:00
vf_fixpts.c vf_fixpts: Mark vf_info_t declaration const 2010-11-02 04:16:45 +02:00
vf_flip.c cosmetics: "struct vf_instance* vf" -> "struct vf_instance *vf" 2010-05-29 17:20:44 +03:00
vf_format.c Merge svn changes up to r31332 2010-06-05 23:37:42 +03:00
vf_framestep.c cleanup: remove unused MEncoder-related code 2011-01-25 02:29:31 +02:00
vf_fspp.c cleanup: do libav* initialization on startup 2011-07-18 00:57:05 +03:00
vf_geq.c Update libav API uses 2011-04-20 04:36:05 +03:00
vf_gradfun.c Merge svn changes up to r31033 2010-04-26 18:25:34 +03:00
vf_halfpack.c cosmetics: "struct vf_instance* vf" -> "struct vf_instance *vf" 2010-05-29 17:20:44 +03:00
vf_harddup.c cosmetics: "struct vf_instance* vf" -> "struct vf_instance *vf" 2010-05-29 17:20:44 +03:00
vf_hqdn3d.c cleanup: remove NULL checks before free() all over the code 2010-11-14 13:11:20 +02:00
vf_hue.c cleanup: remove NULL checks before free() all over the code 2010-11-14 13:11:20 +02:00
vf_il.c cosmetics: "struct vf_instance* vf" -> "struct vf_instance *vf" 2010-05-29 17:20:44 +03:00
vf_ilpack.c vf_ilpack: fix incompatible function types 2011-07-06 09:24:31 +03:00
vf_ivtc.c vf_*: fix pts values passed to the next filter 2011-04-24 03:55:47 +03:00
vf_kerndeint.c cosmetics: "struct vf_instance* vf" -> "struct vf_instance *vf" 2010-05-29 17:20:44 +03:00
vf_lavc.c cleanup: do libav* initialization on startup 2011-07-18 00:57:05 +03:00
vf_lavcdeint.c cleanup: do libav* initialization on startup 2011-07-18 00:57:05 +03:00
vf_mcdeint.c cleanup: do libav* initialization on startup 2011-07-18 00:57:05 +03:00
vf_mirror.c cosmetics: "struct vf_instance* vf" -> "struct vf_instance *vf" 2010-05-29 17:20:44 +03:00
vf_noformat.c Merge svn changes up to r31332 2010-06-05 23:37:42 +03:00
vf_noise.c cleanup: remove NULL checks before free() all over the code 2010-11-14 13:11:20 +02:00
vf_ow.c cosmetics: "struct vf_instance* vf" -> "struct vf_instance *vf" 2010-05-29 17:20:44 +03:00
vf_palette.c Merge svn changes up to r31303 2010-06-02 19:12:01 +03:00
vf_perspective.c libmpcodecs/vf_*.c: Replace memalign() by av_malloc() 2011-02-15 19:12:50 +02:00
vf_phase.c vf_*: fix pts values passed to the next filter 2011-04-24 03:55:47 +03:00
vf_pp7.c cleanup: avoid various GCC warnings 2011-04-20 04:22:53 +03:00
vf_pp.c cleanup: shut up more warnings 2011-05-06 18:33:16 +03:00
vf_pullup.c vf_pullup, vf_yadif: pts handling fixes 2011-06-24 22:31:44 +03:00
vf_qp.c vf_qp: enable compilation depending on libavutil eval API 2011-07-18 00:57:05 +03:00
vf_rectangle.c cosmetics: "struct vf_instance* vf" -> "struct vf_instance *vf" 2010-05-29 17:20:44 +03:00
vf_remove_logo.c cosmetics: "struct vf_instance* vf" -> "struct vf_instance *vf" 2010-05-29 17:20:44 +03:00
vf_rgbtest.c cosmetics: "struct vf_instance* vf" -> "struct vf_instance *vf" 2010-05-29 17:20:44 +03:00
vf_rotate.c cosmetics: "struct vf_instance* vf" -> "struct vf_instance *vf" 2010-05-29 17:20:44 +03:00
vf_sab.c vo_gl: don't accept 9/10-bit formats as input 2011-06-29 10:49:41 +03:00
vf_scale.c video, options: implement better YUV->RGB conversion control 2011-10-16 21:11:11 +03:00
vf_scale.h video, options: implement better YUV->RGB conversion control 2011-10-16 21:11:11 +03:00
vf_screenshot.c vf_screenshot: better check for pixel format swscale support 2011-08-17 01:18:45 +03:00
vf_smartblur.c vo_gl: don't accept 9/10-bit formats as input 2011-06-29 10:49:41 +03:00
vf_softpulldown.c vf_*: fix pts values passed to the next filter 2011-04-24 03:55:47 +03:00
vf_softskip.c cosmetics: "struct vf_instance* vf" -> "struct vf_instance *vf" 2010-05-29 17:20:44 +03:00
vf_spp.c cleanup: do libav* initialization on startup 2011-07-18 00:57:05 +03:00
vf_stereo3d.c vf_stereo3d: Add support for converting to interleaved 3D 2011-07-06 13:01:07 +03:00
vf_swapuv.c cosmetics: "struct vf_instance* vf" -> "struct vf_instance *vf" 2010-05-29 17:20:44 +03:00
vf_telecine.c vf_*: fix pts values passed to the next filter 2011-04-24 03:55:47 +03:00
vf_test.c cosmetics: "struct vf_instance* vf" -> "struct vf_instance *vf" 2010-05-29 17:20:44 +03:00
vf_tfields.c cleanup: remove more warnings 2011-05-02 00:46:48 +03:00
vf_tile.c vf_*: fix pts values passed to the next filter 2011-04-24 03:55:47 +03:00
vf_tinterlace.c vf_*: fix pts values passed to the next filter 2011-04-24 03:55:47 +03:00
vf_unsharp.c cleanup: remove NULL checks before free() all over the code 2010-11-14 13:11:20 +02:00
vf_uspp.c cleanup: do libav* initialization on startup 2011-07-18 00:57:05 +03:00
vf_vo.c options: move libass-related options to struct 2011-09-03 14:26:14 +03:00
vf_yadif.c configure: Remove checks for default inline asm features 2011-06-28 19:04:22 +03:00
vf_yuvcsp.c cosmetics: "struct vf_instance* vf" -> "struct vf_instance *vf" 2010-05-29 17:20:44 +03:00
vf_yvu9.c cosmetics: "struct vf_instance* vf" -> "struct vf_instance *vf" 2010-05-29 17:20:44 +03:00
vf.c build: fix --enable-debug, remove some "#ifdef MP_DEBUG" 2011-07-30 19:03:20 +03:00
vf.h video, options: implement better YUV->RGB conversion control 2011-10-16 21:11:11 +03:00
vfcap.h Add missing license headers to all files in the libmpcodecs directory. 2010-01-30 16:57:40 +00:00
vqf.h Remove trailing whitespace from most files 2009-07-07 02:34:35 +03:00