mirror of https://github.com/mpv-player/mpv
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. |
||
---|---|---|
.. | ||
asf.h | ||
asfguid.h | ||
asfheader.c | ||
asfheader.h | ||
aviheader.c | ||
aviheader.h | ||
aviprint.c | ||
aviprint.h | ||
demux.c | ||
demux.h | ||
demux_asf.c | ||
demux_avi.c | ||
demux_cue.c | ||
demux_edl.c | ||
demux_lavf.c | ||
demux_mf.c | ||
demux_mkv.c | ||
demux_mng.c | ||
demux_mpg.c | ||
demux_packet.h | ||
demux_rawaudio.c | ||
demux_rawvideo.c | ||
demux_ts.c | ||
demux_ts.h | ||
ebml.c | ||
ebml.h | ||
extension.c | ||
matroska.h | ||
mf.c | ||
mf.h | ||
mp3_hdr.c | ||
mp3_hdr.h | ||
mp_taglists.c | ||
mp_taglists.h | ||
mpeg_hdr.c | ||
mpeg_hdr.h | ||
ms_hdr.h | ||
parse_es.c | ||
parse_es.h | ||
stheader.h | ||
video.c |