Mercurial > mplayer.hg
changeset 31139:9a2e299dc256
Add final missing bits of CineForm HD support on Linux (via the Windows
DirectShow codec).
Required changes:
- codecs.conf entry (of course).
- Allow opening files with ¡È.col¡É in the file name, just like ¡Èvp3¡É and ¡È.fpf¡É
already was allowed. (CineForm expects to be able to do this, presumably
for some color management code.)
- In registry.c, fake a few registry keys that the codec expects the installer
to have written. Also, change a few magic numbers (0, 2) to the appropriate
constants (ERROR_SUCCESS, ERROR_FILE_NOT_FOUND) where appropriate, so the code
is easier to follow.
SMP works fine, but seemingly performs suboptimally (e.g., on my dual-core
laptop, CineForm performs better if I lie to it and tell it I have four cores).
I don't know if this is inherent in the codec, or some inefficiency in the
emulated synchronization primitives.
author | sesse |
---|---|
date | Sun, 23 May 2010 16:01:12 +0000 |
parents | 3cf08a0ae965 |
children | 5f59f82c599d |
files | etc/codecs.conf loader/registry.c loader/win32.c |
diffstat | 3 files changed, 36 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/etc/codecs.conf Sun May 23 15:50:49 2010 +0000 +++ b/etc/codecs.conf Sun May 23 16:01:12 2010 +0000 @@ -1960,6 +1960,15 @@ guid 0xe2b7dc56, 0x38c5, 0x11d5, 0x91, 0xf6, 0x00, 0x10, 0x4b, 0xdb, 0x8f, 0xf9 out BGR24,BGR8 flip +videocodec cineformhd + info "CineForm HD" + status working + fourcc CFHD + driver dshow + dll "CFDecode2.ax" + guid 0xAD83011E, 0x01d1, 0x4623, 0x91, 0xfd, 0x6b, 0x75, 0xf1, 0x83, 0xc5, 0xa9 + out UYVY + videocodec lagarith info "Lagarith Lossless Video Codec" comment "http://lags.leetcode.net/codec.html, requires an MMX2 CPU."
--- a/loader/registry.c Sun May 23 15:50:49 2010 +0000 +++ b/loader/registry.c Sun May 23 16:01:12 2010 +0000 @@ -400,9 +400,32 @@ if (!c) return 1; t=find_value_by_name(c); + if (t==0) { + // Hacks for CineForm. + if (strcmp(c, "HKCU\\SOFTWARE\\CineForm\\DecoderProperties\\Resolution") == 0) { + if (data) + *data = 1000; + if (type) + *type = REG_DWORD; + if (count) + *count = sizeof(DWORD); + free(c); + return ERROR_SUCCESS; + } + if (strcmp(c, "HKCU\\SOFTWARE\\CineForm\\DecoderProperties\\PixelFormats") == 0) { + if (data) + *data = 0xffff; + if (type) + *type = REG_DWORD; + if (count) + *count = sizeof(DWORD); + free(c); + return ERROR_SUCCESS; + } + free(c); + return ERROR_FILE_NOT_FOUND; + } free(c); - if (t==0) - return 2; if (type) *type=t->type; if (data) @@ -419,7 +442,7 @@ { *count=t->len; } - return 0; + return ERROR_SUCCESS; } long __stdcall RegCreateKeyExA(long key, const char* name, long reserved, void* classs, long options, long security,