[MPlayer-dev-eng] [PATCH] LEAD MCMW wavelet video codec support

adland adland123 at yahoo.com
Mon Mar 22 02:49:52 CET 2004


Add support for LEAD MCMW 2.0 Wavelet codec
downloaded from
http://www.leadtools.com/evaldownload/downloads.aspx?category=Codecs

dlls used are LCODCCMW2E.dll and LCMW2.dll

samples tested were made using their encoder tool under windows.
viewing or playback works

could this be inserted as a patch after a sanity test

thanks

diff -Naur main/etc/codecs.conf updated/etc/codecs.conf
--- main/etc/codecs.conf        2004-03-21 15:03:01.000000000 -0500
+++ updated/etc/codecs.conf     2004-03-21 19:37:58.000000000 -0500
@@ -1091,6 +1091,15 @@

 ; others:

+videocodec LEADMW20
+  info "Lead CMW wavelet 2.0"
+  status working
+  fourcc LCW2
+  driver dshow
+  dll "LCODCCMW2E.dll"; eval
+  guid 0xe2b7dc56, 0x38c5, 0x11d5, 0x91,0xf6,0x00,0x10,0x4b,0xdb,0x8f,0xf9
+  out BGR24,BGR8 flip
+
 videocodec ffrv10
   info "FFmpeg RV10 decoder"
   status working

diff -Naur main/loader/win32.c updated/loader/win32.c
--- main/loader/win32.c 2004-01-25 15:29:31.000000000 -0500
+++ updated/loader/win32.c      2004-03-21 19:55:51.000000000 -0500
@@ -1837,6 +1837,15 @@
     if(data && count)dbgprintf("  read %d bytes: '%s'\n", *count, data);
     return result;
 }
+
+//from wine source dlls/advapi32/registry.c
+static long WINAPI expRegCreateKeyA(long hkey, const char* name, int *retkey)
//added
+{
+  dbgprintf("RegCreateKeyA(key 0x%x, name
0x%x='%s',newkey=0x%x)\n",hkey,name,retkey);
+  return RegCreateKeyExA( hkey, name, 0, NULL,REG_OPTION_NON_VOLATILE,
+                 KEY_ALL_ACCESS , NULL, retkey, NULL );
+}
+
 static long WINAPI expRegCreateKeyExA(long key, const char* name,
   long reserved,void* classs, long options, long security,
         void* sec_attr, int* newkey, int* status)
@@ -4914,6 +4923,7 @@
 };
 struct exports exp_advapi32[]={
     FF(RegCloseKey, -1)
+    FF(RegCreateKeyA,-1)
     FF(RegCreateKeyExA, -1)
     FF(RegEnumKeyExA, -1)
     FF(RegEnumValueA, -1)
@@ -5149,7 +5159,7 @@

 #ifndef LOADLIB_TRY_NATIVE
   /* hack for truespeech and vssh264*/
-  if (!strcmp(library, "tsd32.dll") || !strcmp(library,"vssh264dec.dll"))
+  if (!strcmp(library, "tsd32.dll") || !strcmp(library,"vssh264dec.dll") ||
 !strcmp(library,"LCMW2.dll"))
 #endif
   /* ok, this is a hack, and a big memory leak. should be fixed. - alex */
    {

diff -Naur main/loader/module.c updated/loader/module.c
--- main/loader/module.c        2004-03-18 19:49:24.000000000 -0500
+++ updated/loader/module.c     2004-03-21 20:18:18.000000000 -0500
@@ -455,6 +455,22 @@
           }
         }

+        if (strstr(libname,"LCODCCMW2E.dll") && wm)
+       {
+          if (PE_FindExportedFunction(wm, "DllRegisterServer",
TRUE)!=(void*)0x1000356b) {
+           fprintf (stderr, "Unsupported Evaluation Lead MCMW 2.0 codec
 version\n");
+            return 0;
+           }
+       }
+
+        if (strstr(libname,"LCMW2.dll") && wm)
+        {
+         if (PE_FindExportedFunction(wm, "CMW_DeCompressFrame",
TRUE)!=(void*)0x1FEC7FE0){
+           fprintf (stderr, "Unsupported Evaluation Lead MCMW 2.0 codec
 version\n");
+            return 0;
+             }
+        }
+
        if (strstr(libname,"QuickTime.qts") && wm)
        {
            void** ptr;





More information about the MPlayer-dev-eng mailing list