0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 20:03:10 +02:00
mpv/demux
wm4 8751a0e261 video: decouple internal pixel formats from FourCCs
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.
2013-01-13 20:04:11 +01:00
..
asf.h Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
asfguid.h Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
asfheader.c Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
asfheader.h Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
aviheader.c stream, demux: replace off_t with int64_t 2012-11-20 18:00:15 +01:00
aviheader.h stream, demux: replace off_t with int64_t 2012-11-20 18:00:15 +01:00
aviprint.c Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
aviprint.h
demux_asf.c stream, demux: replace off_t with int64_t 2012-11-20 18:00:15 +01:00
demux_avi.c stream, demux: replace off_t with int64_t 2012-11-20 18:00:15 +01:00
demux_cue.c Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
demux_edl.c Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
demux_lavf.c demux_lavf: avio_flush in DEMUXER_CTRL_RESYNC 2013-01-10 12:36:13 +01:00
demux_mf.c demux_mf: allow displaying single image files, various cleanups 2012-11-16 21:21:16 +01:00
demux_mkv.c demux_mkv: work around bad OutputSamplingFrequency values 2013-01-13 13:25:57 +01:00
demux_mng.c video: decouple internal pixel formats from FourCCs 2013-01-13 20:04:11 +01:00
demux_mpg.c demux_mpg, ass_mp: fix warnings 2012-12-28 08:40:40 +01:00
demux_packet.h stream, demux: replace off_t with int64_t 2012-11-20 18:00:15 +01:00
demux_rawaudio.c stream, demux: replace off_t with int64_t 2012-11-20 18:00:15 +01:00
demux_rawvideo.c video: decouple internal pixel formats from FourCCs 2013-01-13 20:04:11 +01:00
demux_ts.c stream, demux: replace off_t with int64_t 2012-11-20 18:00:15 +01:00
demux_ts.h
demux.c demux: fix behavior with files that have sparse video packets 2012-12-11 00:37:55 +01:00
demux.h configure: remove __builtin_expect check 2013-01-13 13:55:22 +01:00
ebml.c Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
ebml.h Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
extension.c Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
matroska.h
mf.c Replace strsep() uses 2013-01-13 17:32:39 +01:00
mf.h demux_mf: allow displaying single image files, various cleanups 2012-11-16 21:21:16 +01:00
mp3_hdr.c Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
mp3_hdr.h
mp_taglists.c audio/decode: remove ad_pcm and use ad_lavc for PCM 2012-12-11 00:37:54 +01:00
mp_taglists.h
mpeg_hdr.c Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
mpeg_hdr.h
ms_hdr.h
parse_es.c Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
parse_es.h Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
stheader.h video: decouple internal pixel formats from FourCCs 2013-01-13 20:04:11 +01:00
video.c demux: fix behavior with files that have sparse video packets 2012-12-11 00:37:55 +01:00