diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-08-18 02:29:37 +0300 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-08-18 02:29:37 +0300 |
commit | 95da34aa071d64b21ef3e952b987ba3dcee84ca0 (patch) | |
tree | eabf4399e40fd270714c53d40688eadadfd4c5ff /codec-cfg.c | |
parent | f394231f5de9d1ff679f1b2da4d1f1b303ae914a (diff) | |
parent | 3961e12fca2f1ec10c64e3ff298828feecca52c9 (diff) | |
download | mpv-95da34aa071d64b21ef3e952b987ba3dcee84ca0.tar.bz2 mpv-95da34aa071d64b21ef3e952b987ba3dcee84ca0.tar.xz |
Merge svn changes up to r29532
Diffstat (limited to 'codec-cfg.c')
-rw-r--r-- | codec-cfg.c | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/codec-cfg.c b/codec-cfg.c index db26866fbe..6e90c06fa8 100644 --- a/codec-cfg.c +++ b/codec-cfg.c @@ -141,10 +141,13 @@ static int add_to_format(char *s, char *alias,unsigned int *fourcc, unsigned int return 1; } - static struct { + static const struct { const char *name; const unsigned int num; } fmt_table[] = { + // note: due to parser deficiencies/simplicity, if one format + // name matches the beginning of another, the longer one _must_ + // come first in this list. {"YV12", IMGFMT_YV12}, {"I420", IMGFMT_I420}, {"IYUV", IMGFMT_IYUV}, @@ -162,20 +165,22 @@ static int add_to_format(char *s, char *alias,unsigned int *fourcc, unsigned int {"UYVY", IMGFMT_UYVY}, {"YVYU", IMGFMT_YVYU}, - {"RGB4", IMGFMT_RGB|4}, - {"RGB8", IMGFMT_RGB|8}, - {"RGB15", IMGFMT_RGB|15}, - {"RGB16", IMGFMT_RGB|16}, - {"RGB24", IMGFMT_RGB|24}, - {"RGB32", IMGFMT_RGB|32}, - {"BGR4", IMGFMT_BGR|4}, - {"BGR8", IMGFMT_BGR|8}, - {"BGR15", IMGFMT_BGR|15}, - {"BGR16", IMGFMT_BGR|16}, - {"BGR24", IMGFMT_BGR|24}, - {"BGR32", IMGFMT_BGR|32}, - {"RGB1", IMGFMT_RGB|1}, - {"BGR1", IMGFMT_BGR|1}, + {"RGB48LE", IMGFMT_RGB48LE}, + {"RGB48BE", IMGFMT_RGB48BE}, + {"RGB4", IMGFMT_RGB4}, + {"RGB8", IMGFMT_RGB8}, + {"RGB15", IMGFMT_RGB15}, + {"RGB16", IMGFMT_RGB16}, + {"RGB24", IMGFMT_RGB24}, + {"RGB32", IMGFMT_RGB32}, + {"BGR4", IMGFMT_BGR4}, + {"BGR8", IMGFMT_BGR8}, + {"BGR15", IMGFMT_BGR15}, + {"BGR16", IMGFMT_BGR16}, + {"BGR24", IMGFMT_BGR24}, + {"BGR32", IMGFMT_BGR32}, + {"RGB1", IMGFMT_RGB1}, + {"BGR1", IMGFMT_BGR1}, {"MPES", IMGFMT_MPEGPES}, {"ZRMJPEGNI", IMGFMT_ZRMJPEGNI}, |