mirror of
https://github.com/mpv-player/mpv
synced 2024-12-24 07:42:17 +00:00
8751a0e261
mplayer's video chain traditionally used FourCCs for pixel formats. For example, it used IMGFMT_YV12 for 4:2:0 YUV, which was defined to the string 'YV12' interpreted as unsigned int. Additionally, it used to encode information into the numeric values of some formats. The RGB formats had their bit depth and endian encoded into the least significant byte. Extended planar formats (420P10 etc.) had chroma shift, endian, and component bit depth encoded. (This has been removed in recent commits.) Replace the FourCC mess with a simple enum. Remove all the redundant formats like YV12/I420/IYUV. Replace some image format names by something more intuitive, most importantly IMGFMT_YV12 -> IMGFMT_420P. Add img_fourcc.h, which contains the old IDs for code that actually uses FourCCs. Change the way demuxers, that output raw video, identify the video format: they set either MP_FOURCC_RAWVIDEO or MP_FOURCC_IMGFMT to request the rawvideo decoder, and sh_video->imgfmt specifies the pixel format. Like the previous hack, this is supposed to avoid the need for a complete codecs.cfg entry per format, or other lookup tables. (Note that the RGB raw video FourCCs mostly rely on ffmpeg's mappings for NUT raw video, but this is still considered better than adding a raw video decoder - even if trivial, it would be full of annoying lookup tables.) The TV code has not been tested. Some corrective changes regarding endian and other image format flags creep in. |
||
---|---|---|
.. | ||
ai_alsa1x.c | ||
ai_oss.c | ||
asf_mmst_streaming.c | ||
asf_mmst_streaming.h | ||
asf_streaming.c | ||
audio_in.c | ||
audio_in.h | ||
cache2.c | ||
cache2.h | ||
cdd.h | ||
cdinfo.c | ||
cookies.c | ||
cookies.h | ||
dvb_tune.c | ||
dvb_tune.h | ||
dvbin.h | ||
frequencies.c | ||
frequencies.h | ||
http.c | ||
http.h | ||
network.c | ||
network.h | ||
pvr.h | ||
stream_avdevice.c | ||
stream_bluray.c | ||
stream_cdda.c | ||
stream_cddb.c | ||
stream_dvb.c | ||
stream_dvd_common.c | ||
stream_dvd_common.h | ||
stream_dvd.c | ||
stream_dvd.h | ||
stream_file.c | ||
stream_ftp.c | ||
stream_lavf.c | ||
stream_mf.c | ||
stream_null.c | ||
stream_pvr.c | ||
stream_radio.c | ||
stream_radio.h | ||
stream_smb.c | ||
stream_tv.c | ||
stream_udp.c | ||
stream_vcd.c | ||
stream_vstream.c | ||
stream.c | ||
stream.h | ||
tcp.c | ||
tcp.h | ||
tv.c | ||
tv.h | ||
tvi_bsdbt848.c | ||
tvi_def.h | ||
tvi_dummy.c | ||
tvi_v4l2.c | ||
udp.c | ||
udp.h | ||
url.c | ||
url.h | ||
vcd_read_darwin.h | ||
vcd_read_fbsd.h | ||
vcd_read_win32.h | ||
vcd_read.h |