1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-25 08:12:17 +00: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
asfguid.h
asfheader.c
asfheader.h
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
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
demux_edl.c
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
ebml.h
extension.c
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
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
mpeg_hdr.h
ms_hdr.h
parse_es.c
parse_es.h
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